Skip to content

Commit

Permalink
Release v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
goodmami committed Mar 3, 2016
1 parent a91acd1 commit 12b8ec2
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 30 deletions.
71 changes: 67 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,67 @@

## [Unreleased][unreleased]

## [v0.4.0][]

This release fixes a number of bugs (including fixes from two new
contributors; see the [README][]), and adds some minor features:

* more convenient introspection of TDL lists
* a LaTeX exporter for DMRS

From [v0.4.0][], pyDelphin uses [semantic versioning](http://semver.org/),
and is available on [PyPI](https://pypi.python.org/pypi/pyDelphin).

This release also drops support for Python 2.6 (Python 2.7 is still
supported and tested).

### Added

* `delphin.extra.latex` is added for exporting to LaTeX; currently
contains DMRS export via `dmrs_tikz_dependency()`
* TdlConsList and TdlDiffList classes are added, which make working
with list structures in TDL more convenient; e.g., the `values()`
function returns a Python list of the elements (instead of having
to get them via `REST.REST.FIRST`, etc.)

### Removed

* Python2.6 support
* unused top-level util.py

### Fixed

* `Xmrs.subgraph()` no longer crashes when selecting only the top node
* allow hyphens in long-style variable sorts (e.g. `ref-ind2`)
* `dmrx.loads()` no longer fails for Python2
* DMRS->MRS conversion no longer generates invalid labels for
transitive `*/EQ` links in particular orders
* MrsPath walks don't no longer cross `/EQ` links twice
* fix a bug in compound `ARG&ARG2` connectors in MrsPath

### Changed

* `delphin.mrs.simplemrs`
- uppercase variable property names
- don't print top-level `<-1:-1>` Lnk values for SimpleMRS 1.1
- normalize case for other features and role names
* EPs in Xmrs are stored as ElementaryPredication objects instead of
plain tuples (with no significant drop in performance)
* VarGenerator uses next unused vid instead of next in sequence (i.e.
it fills in gaps)
* `delphin.mrs.components.Pred`
- comparison is now case-insensitive
- characters like `<` are now allowed inside a pred
- don't allow the invalid `_relation` suffix, and pretend the `_rel`
suffix is there if it isn't
* `ElementaryPredication.is_quantifier()` looks for the `RSTR` role;
Pred and Node still look for a `q` POS, since they don't have access
to the arguments/links
* added `__contains__()` method to TypedFeatureStructure to check for
the presence of features
* TDL parsing treats strings as primitives instead of as the supertype
of some TypedFeatureStructure

## [v0.3][]

This release simplifies the pyDelphin core classes and improves
Expand Down Expand Up @@ -136,8 +197,10 @@ tests for pyDelphin.

There was no CHANGELOG file prior to this release, so I don't have much
information about changes, except for
[commit messages](https://github.com/goodmami/pydelphin/commits/v0.2).
[commit messages](../../commits/v0.2).

[unreleased]: https://github.com/goodmami/pydelphin/tree/develop
[v0.3]: https://github.com/goodmami/pydelphin/releases/tag/v0.3
[v0.2]: https://github.com/goodmami/pydelphin/releases/tag/v0.2
[unreleased]: ../../tree/develop
[v0.4.0]: ../../releases/tag/v0.4.0
[v0.3]: ../../releases/tag/v0.3
[v0.2]: ../../releases/tag/v0.2
[README]: README.md
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
# pyDelphin <br/> Python libraries for DELPH-IN

> NOTE for previous pyDelphin users: The latest version (0.3) has some
> backward-**incompatible** changes that may break your code. The
> upgrade path shouldn't be difficult (contact me if there's trouble),
> and the changes bring big performance gains, so I think it's worth
> it. Sorry for the trouble while the API stabilizes.
>
> Also note that the primary repo for pyDelphin is now
> https://github.com/delph-in/pydelphin
> NOTE for previous pyDelphin users: Recent versions of pyDelphin may
> have backwards-incompatible changes with prior versions. Please
> [file an issue](https://github.com/delph-in/pydelphin/issues) if you
> have trouble upgrading.
pyDelphin is a set of Python libraries for the
processing of [DELPH-IN](http://delph-in.net) data. It doesn't aim to
Expand Down Expand Up @@ -108,15 +104,21 @@ And here's how to compile, parse, and generate with the ACE wrapper:
## Installation and Requirements

pyDelphin is developed for [Python 3](http://python.org/download/)
(3.3+), but it has also been tested to work with Python 2.7. The
[Pygments](http://pygments.org/) package is required for TDL and
SimpleMRS syntax highlighting, and
[NetworkX](http://networkx.github.io/) is required for isomorphism
checking.

pyDelphin does not need to be installed to be used. You can
adjust `PYTHONPATH` to include the pyDelphin directory, or copy the
`delphin/` subdirectory into your project's main directory.
(3.3+), but it has also been tested to work with Python 2.7. Optional
requirements include:
- [NetworkX](http://networkx.github.io/) for MRS isomorphism
checking
- [Pygments](http://pygments.org/) for TDL and SimpleMRS syntax
highlighting
- [tikz-dependency](https://www.ctan.org/pkg/tikz-dependency), while
not a Python requirement, is needed for compiling LaTeX documents
using exported DMRSs

pyDelphin itself does not need to be installed to be used. You can
[adjust `PYTHONPATH`](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH)
to include the pyDelphin directory, or copy the `delphin/`
subdirectory into your project's main directory (but in this latter
case be aware of licensing requirements).

If you want to have the `delphin` packages generally available for
importing, you can use the provided `setup.py` script to install (you
Expand All @@ -142,10 +144,22 @@ The following packages/modules are available:
- `tfs`: Typed-Feature Structures
- `extra.highlight`: [Pygments](http://pygments.org/)-based syntax
highlighting (currently just for TDL and SimpleMRS)
- `extra.latex`: Formatting for LaTeX (just DMRS)
- `interfaces.ace`: Python wrapper for common tasks using
[ACE](http://sweaglesw.org/linguistics/ace/)

## Contributors

- [Michael Wayne Goodman](https://github.com/goodmami/) (primary author)
- [T.J. Trimble](https://github.com/dantiston/) (packaging, derivations, ACE)
- [Guy Emerson](https://github.com/guyemerson/) (MRS)
- [Alex Kuhnle](https://github.com/AlexKuhnle/) (MRS)

## Related Software

- https://github.com/wpm/Ruby-DELPH-IN
- https://github.com/ned2/typediff
- Also, on the DELPH-IN wiki:
- http://moin.delph-in.net/
- http://moin.delph-in.net/ToolsTop
- http://moin.delph-in.net/DelphinApplications
17 changes: 17 additions & 0 deletions delphin/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# This __about__.py file for storing project metadata is inspired by
# the warehouse project:
# https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py

__version__ = '0.4.0'
__version_info__ = __version__.replace('.', ' ').replace('-', ' ').split()

__title__ = 'pyDelphin'
__summary__ = 'Libraries and scripts for DELPH-IN data'
__uri__ = 'https://github.com/delph-in/pydelphin'

__author__ = 'Michael Wayne Goodman'
__email__ = '[email protected]'

__license__ = 'MIT'
__copyright__ = '2013 %s <%s> and contributors' % (__author__, __email__)
2 changes: 1 addition & 1 deletion delphin/codecs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
DeprecationWarning
)

from delphin.mrs import simplemrs, mrx, dmrx
from delphin.mrs import simplemrs, mrx, dmrx
33 changes: 25 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import sys
import os
from setuptools import setup
from setuptools.command.test import test as TestCommand

Expand Down Expand Up @@ -31,15 +32,29 @@ def initialize_options(self):
'--cov-report=html'
]

long_description = '''\
pyDelphin provides a suite of libraries for modeling Minimal Recursion
Semantics (MRS; including DMRS), derivation trees, and [incr tsdb()]
profiles; introspection tools for Type Description Language (TDL),
which is used to define HPSG grammars; a Python wrapper for the ACE
parser; and some extra tools for syntax highlighting or LaTeX output.
Python developers who work with DELPH-IN data can rely on pyDelphin to
correctly deal with such data via convenient interfaces.'''

base_dir = os.path.dirname(__file__)
about = {}
with open(os.path.join(base_dir, "delphin", "__about__.py")) as f:
exec(f.read(), about)

setup(
name='pyDelphin',
version='0.3',
url='https://github.com/delph-in/pydelphin',
author='Michael Wayne Goodman',
author_email='[email protected]',
description='Libraries and scripts for DELPH-IN data.',
license='MIT',
name=about['__title__'],
version=about['__version__'],
description=about['__summary__'],
long_description=long_description,
url=about['__uri__'],
author=about['__author__'],
author_email=about['__email__'],
license=about['__license__'],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
Expand All @@ -52,6 +67,7 @@ def initialize_options(self):
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Text Processing :: Linguistic',
Expand All @@ -60,10 +76,11 @@ def initialize_options(self):
keywords='nlp semantics hpsg delph-in',
packages=[
'delphin',
'delphin.lib',
'delphin.interfaces',
'delphin.mrs',
'delphin.extra',
'delphin.codecs',
'delphin.codecs'
],
install_requires=[
'networkx',
Expand Down
13 changes: 13 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
envlist = py27, py33, py34, py35

[testenv]
commands = {envpython} setup.py test
deps =
pytest
networkx

0 comments on commit 12b8ec2

Please sign in to comment.