Skip to content

Commit 77fc995

Browse files
authored
Merge pull request #336 from delph-in/v1.6.0
V1.6.0
2 parents e8c3c99 + f121c56 commit 77fc995

31 files changed

+971
-466
lines changed

CHANGELOG.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
# Change Log
22

3-
## Unreleased
3+
## [v1.6.0]
4+
5+
**Release date: 2021-09-30**
6+
7+
### Added
8+
9+
* REPP mask (`=`) operator and full masking support ([#331])
10+
11+
### Fixed
12+
13+
* SimpleDMRS no longer requires `index` or `top` to be specified when
14+
decoding ([#334])
15+
* DMRX codec now conforms to the DTD regarding the upper/lower case of
16+
attributes ([#333])
17+
18+
### Changed
19+
20+
* REPP no longer requires iterative group calls to appear after the
21+
group definitions ([#308])
422

523

624
## [v1.5.1]
@@ -488,17 +506,18 @@ documented.
488506
**Release date: 2018-10-20**
489507

490508
This release introduces a completely redone TDL parser that follows
491-
the description of TDL syntax at http://moin.delph-in.net/TdlRfc based
492-
on recent discussions on the DELPH-IN mailing list (links to these
493-
discussions are at the bottom of the linked wiki). In addition, there
494-
are three other major introductions: `delphin.commands`, which gives
509+
the description of TDL syntax at
510+
https://github.com/delph-in/docs/wiki/TdlRFC based on recent
511+
discussions on the DELPH-IN mailing list (links to these discussions
512+
are at the bottom of the linked wiki). In addition, there are three
513+
other major introductions: `delphin.commands`, which gives
495514
programmatic access to the `delphin` command-line utilities;
496515
`delphin.tsql`, which implements a subset of the TSQL query language
497-
(see http://moin.delph-in.net/TsqlRfc) that now replace the --filter
498-
options for certain commands; and the new `TypeHierarchy` class in
499-
`delphin.tfs`. Improvements to the `delphin.itsdb.TestSuite` class
500-
now give it feature-parity with the `ItsdbProfile` class it replaces.
501-
See the rest of the changelog for additional improvements.
516+
(see https://github.com/delph-in/docs/wiki/TsqlRfc) that now replace
517+
the --filter options for certain commands; and the new `TypeHierarchy`
518+
class in `delphin.tfs`. Improvements to the `delphin.itsdb.TestSuite`
519+
class now give it feature-parity with the `ItsdbProfile` class it
520+
replaces. See the rest of the changelog for additional improvements.
502521

503522
### Fixed
504523

@@ -1327,6 +1346,7 @@ There was no CHANGELOG file prior to this release, so I don't have much
13271346
information about changes, except for
13281347
[commit messages](../../commits/v0.2).
13291348

1349+
[v1.6.0]: ../../releases/tag/v1.6.0
13301350
[v1.5.1]: ../../releases/tag/v1.5.1
13311351
[v1.5.0]: ../../releases/tag/v1.5.0
13321352
[v1.4.1]: ../../releases/tag/v1.4.1
@@ -1493,7 +1513,11 @@ information about changes, except for
14931513
[#303]: https://github.com/delph-in/pydelphin/issues/303
14941514
[#304]: https://github.com/delph-in/pydelphin/issues/304
14951515
[#306]: https://github.com/delph-in/pydelphin/issues/306
1516+
[#308]: https://github.com/delph-in/pydelphin/issues/308
14961517
[#316]: https://github.com/delph-in/pydelphin/issues/316
14971518
[#319]: https://github.com/delph-in/pydelphin/issues/319
14981519
[#323]: https://github.com/delph-in/pydelphin/issues/323
14991520
[#324]: https://github.com/delph-in/pydelphin/issues/324
1521+
[#331]: https://github.com/delph-in/pydelphin/issues/331
1522+
[#333]: https://github.com/delph-in/pydelphin/issues/333
1523+
[#334]: https://github.com/delph-in/pydelphin/issues/334

CONTRIBUTING.md

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ The easiest way to contribute to PyDelphin is to try it out and enter
44
bug reports and feature requests. If you're contributing code, fork
55
the repository and make pull requests to the `develop` branch.
66

7+
78
## Filing issues
89

910
File issues here: https://github.com/delph-in/pydelphin/issues
@@ -13,7 +14,10 @@ Please use the issue tracker for:
1314
* bug reports
1415
* feature requests
1516
* documentation requests
16-
* PyDelphin questions
17+
18+
Questions about PyDelphin can be asked on the [DELPH-IN Discourse
19+
site](https://delphinqa.ling.washington.edu/) in the "PyDelphin Tools"
20+
category.
1721

1822
For bug requests, please provide the following, if possible:
1923

@@ -23,15 +27,16 @@ For bug requests, please provide the following, if possible:
2327
```python
2428
>>> from delphin.__about__ import __version__
2529
>>> __version__ # distribution version
26-
'1.5.0'
30+
'1.6.0'
2731
>>> from delphin import mrs
2832
>>> mrs.__version__ # package version
29-
'1.5.0'
33+
'1.6.0'
3034
```
3135
* Python version (e.g. 3.6, 3.7, etc.)
3236

3337
For feature requests, please provide a use case for the feature.
3438

39+
3540
## Submitting code
3641

3742
Please follow these guidelines for code and repository changes:
@@ -44,9 +49,10 @@ Please follow these guidelines for code and repository changes:
4449
classes when standard Python data structures are sufficient
4550
* In implementing DELPH-IN formalisms and formats, aim first to be
4651
correct and complete (according to documentation at
47-
http://moin.delph-in.net/; if a wiki doesn't exist, it's a good idea
48-
to make one), and secondly convenient. Avoid adding features that
49-
aren't part of the spec and would have limited utility.
52+
https://github.com/delph-in/docs/wiki/; if a wiki doesn't exist,
53+
it's a good idea to make one), and secondly convenient. Avoid adding
54+
features that aren't part of the spec and would have limited
55+
utility.
5056
* PyDelphin is primarily a library, not an application, so application
5157
code in general belongs in separate repositories. Applications can,
5258
however, make use of the `delphin` namespace.
@@ -55,11 +61,12 @@ Please follow these guidelines for code and repository changes:
5561
functions. Follow [Google-style docstrings] and use
5662
[reStructuredText] for formatting.
5763

58-
### Testing
64+
### Creating a Development Environment
5965

60-
Always run the unit tests before committing. First, from a terminal
61-
with PyDelphin's top-level directory as the current working directory,
62-
create a virtual environment (the following assumes you have Python 3
66+
In order to run the tests and build the documentation you'll need to
67+
create a development environment: a virtual environment with the
68+
dependencies installed. First create and activate a virtual
69+
environment from a terminal (the following assumes you have Python 3
6370
installed; the commands may differ depending on your operating system
6471
and choice of shell):
6572

@@ -82,36 +89,42 @@ then install PyDelphin's dependencies and run tests with the current
8289
version of Python:
8390

8491
```console
85-
$ pip install .[test]
86-
$ pytest
87-
...
92+
$ pip install -e .[dev]
8893
```
8994

90-
To run the tests for all supported versions of Python, a tool like
91-
[Tox](https://tox.readthedocs.io/) is helpful. First install `tox`:
95+
The `-e` option is an "editable" install, meaning that Python will use
96+
the source files directly (via symlinks) instead of copying them into
97+
the virtual environment. The benefit is that you won't have to
98+
reinstall each time you make a change. The `[dev]` extra installs all
99+
dependencies for testing, building documentation, and uploading
100+
releases. If you just want to run the unit tests, the `[tests]` extra
101+
is sufficient.
92102

93-
```console
94-
$ pip install tox
95-
```
103+
### Testing
96104

97-
Then create a `tox.ini` file in the same directory as `setup.py`:
105+
Always run the unit tests before committing. Simply run pytest from
106+
PyDelphin's top directory to run the unit tests:
98107

99-
[tox]
100-
envlist = py36,py37,py38,py39
108+
```console
109+
$ pytest
110+
```
101111

102-
[testenv]
103-
usedevelop = True
104-
extras = tests
105-
commands = pytest
112+
Note that passing the tests for one version of Python may not be
113+
sufficient for the code to be accepted; it must pass the tests against
114+
all supported versions of Python.
106115

107-
Then you can run `tox` which will create virtual environments and run
108-
`pytest` for each version (note: you need to have each of those
109-
versions of Python installed for it to work):
116+
The commands for linting (style and type checking) need some
117+
configuration:
110118

111119
```console
112-
$ tox
120+
$ flake8 delphin --extend-ignore E221
121+
$ mypy delphin --namespace-packages --explicit-package-bases --ignore-missing-imports
113122
```
114123

124+
These tests will be run automatically when a commit is pushed or pull
125+
request is submitted against the `develop` branch, but it's often more
126+
convenient to run it locally before pushing commits.
127+
115128
### Test Coverage
116129

117130
Compute test coverage by installing
@@ -122,6 +135,7 @@ Compute test coverage by installing
122135
Note that the codebase doesn't yet have full test coverage.
123136
Contributions of unit tests are very welcome!
124137

138+
125139
## Documentation
126140

127141
The documentation resides in the `docs/` subdirectory, which contains

README.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22

33
[![PyPI Version](https://img.shields.io/pypi/v/pydelphin.svg)](https://pypi.org/project/PyDelphin/)
44
![Python Support](https://img.shields.io/pypi/pyversions/pydelphin.svg)
5-
[![Test Status](https://github.com/delph-in/pydelphin/workflows/tests/badge.svg)](https://github.com/delph-in/pydelphin/actions?query=workflow%3A%22tests%22)
5+
[![Test Status](https://github.com/delph-in/pydelphin/actions/workflows/checks.yml/badge.svg)](https://github.com/delph-in/pydelphin/actions/workflows/checks.yml)
66
[![Documentation Status](https://readthedocs.org/projects/pydelphin/badge/?version=latest)](https://pydelphin.readthedocs.io/en/latest/?badge=latest)
7+
![Discourse topics](https://img.shields.io/discourse/topics?color=%234b2e83&server=https%3A%2F%2Fdelphinqa.ling.washington.edu)
78

89
[DELPH-IN](http://delph-in.net) is an international consortium of
910
researchers committed to producing precise, high-quality language
1011
processing tools and resources, primarily in the
1112
[HPSG](http://hpsg.stanford.edu/) syntactic and
12-
[MRS](http://moin.delph-in.net/RmrsTop) semantic frameworks, and
13-
PyDelphin is a suite of Python libraries for processing data and
14-
interacting with tools in the DELPH-IN ecosystem. PyDelphin's goal is
15-
to lower the barriers to making use of DELPH-IN resources to help
16-
users quickly build applications or perform experiments, and it has
17-
been successfully used for research into machine translation (e.g.,
18-
[Goodman, 2018]), sentence chunking ([Muszyńska, 2016]), neural
19-
semantic parsing ([Buys & Blunsom, 2017]), natural language
20-
generation ([Hajdik et al., 2019]), and more.
13+
[MRS](https://github.com/delph-in/docs/wiki/RmrsTop) semantic
14+
frameworks, and PyDelphin is a suite of Python libraries for
15+
processing data and interacting with tools in the DELPH-IN
16+
ecosystem. PyDelphin's goal is to lower the barriers to making use of
17+
DELPH-IN resources to help users quickly build applications or perform
18+
experiments, and it has been successfully used for research into
19+
machine translation (e.g., [Goodman, 2018]), sentence chunking
20+
([Muszyńska, 2016]), neural semantic parsing ([Buys & Blunsom, 2017]),
21+
natural language generation ([Hajdik et al., 2019]), and more.
2122

2223
[Goodman, 2018]: https://goodmami.org/static/goodman-dissertation.pdf
2324
[Muszyńska, 2016]: https://www.aclweb.org/anthology/P16-3014
@@ -55,38 +56,38 @@ an issue][issues].
5556
PyDelphin contains the following modules:
5657

5758
Semantic Representations:
58-
- [`delphin.mrs`]: [Minimal Recursion Semantics](http://moin.delph-in.net/MrsRfc)
59-
- [`delphin.eds`]: [Elementary Dependency Structures](http://moin.delph-in.net/EdsTop)
60-
- [`delphin.dmrs`]: [Dependency Minimal Recursion Semantics](http://moin.delph-in.net/RmrsDmrs)
59+
- [`delphin.mrs`]: [Minimal Recursion Semantics](https://github.com/delph-in/docs/wiki/MrsRfc)
60+
- [`delphin.eds`]: [Elementary Dependency Structures](https://github.com/delph-in/docs/wiki/EdsTop)
61+
- [`delphin.dmrs`]: [Dependency Minimal Recursion Semantics](https://github.com/delph-in/docs/wiki/RmrsDmrs)
6162

6263
Semantic Components and Interfaces:
63-
- [`delphin.semi`]: [Semantic Interface](http://moin.delph-in.net/SemiRfc)
64-
- [`delphin.vpm`]: [Variable Property Mapping](http://moin.delph-in.net/RmrsVpm)
64+
- [`delphin.semi`]: [Semantic Interface](https://github.com/delph-in/docs/wiki/SemiRfc)
65+
- [`delphin.vpm`]: [Variable Property Mapping](https://github.com/delph-in/docs/wiki/RmrsVpm)
6566
- [`delphin.variable`]: MRS variables
66-
- [`delphin.predicate`]: [Semantic Predicates](http://moin.delph-in.net/PredicateRfc)
67+
- [`delphin.predicate`]: [Semantic Predicates](https://github.com/delph-in/docs/wiki/PredicateRfc)
6768
- [`delphin.scope`]: Underspecified scope
6869
- [`delphin.sembase`]: Basic semantic structures
6970
- [`delphin.codecs`]: A wide variety of serialization codecs for MRS, EDS, and DMRS
7071

7172
Grammar and Parse Inspection:
72-
- [`delphin.derivation`]: [Derivation trees](http://moin.delph-in.net/ItsdbDerivations)
73-
- [`delphin.tdl`]: [Type-Description Language](http://moin.delph-in.net/TdlRfc)
73+
- [`delphin.derivation`]: [Derivation trees](https://github.com/delph-in/docs/wiki/ItsdbDerivations)
74+
- [`delphin.tdl`]: [Type-Description Language](https://github.com/delph-in/docs/wiki/TdlRfc)
7475
- [`delphin.tfs`]: Feature structures and type hierarchies
7576

7677
Tokenization:
77-
- [`delphin.repp`]: [Regular-Expression PreProcessor](http://moin.delph-in.net/ReppTop)
78-
- [`delphin.tokens`]: [YY Token lattices](http://moin.delph-in.net/PetInput#YY_Input_Mode)
78+
- [`delphin.repp`]: [Regular-Expression PreProcessor](https://github.com/delph-in/docs/wiki/ReppTop)
79+
- [`delphin.tokens`]: [YY Token lattices](https://github.com/delph-in/docs/wiki/PetInput#yy-input-mode)
7980
- [`delphin.lnk`]: Lnk surface alignments
8081

8182
Corpus Management and Processing:
82-
- [`delphin.itsdb`]: [\[incr tsdb()\]](http://moin.delph-in.net/ItsdbTop) profiles
83+
- [`delphin.itsdb`]: [\[incr tsdb()\]](https://github.com/delph-in/docs/wiki/ItsdbTop) profiles
8384
- [`delphin.tsdb`]: Low-level interface to test suite databases
84-
- [`delphin.tsql`]: [TSQL](http://moin.delph-in.net/TsqlRfc) test suite queries
85+
- [`delphin.tsql`]: [TSQL](https://github.com/delph-in/docs/wiki/TsqlRfc) test suite queries
8586

8687
Interfaces with External Processors:
8788
- [`delphin.interface`]: Structures for interacting with external processors
8889
- [`delphin.ace`]: Python wrapper for common tasks using [ACE](http://sweaglesw.org/linguistics/ace/)
89-
- [`delphin.web`]: Client for the [web API](http://moin.delph-in.net/ErgApi)
90+
- [`delphin.web`]: Client for the [web API](https://github.com/delph-in/docs/wiki/ErgApi)
9091

9192
Core Components and Command Line Interface:
9293
- [`delphin.commands`]: Functional interface to common tasks
@@ -128,7 +129,7 @@ Core Components and Command Line Interface:
128129
### Getting Help
129130

130131
Please use the [issue tracker][issues] for bug reports, feature
131-
requests, and PyDelphin-specific questions. For more general questions
132+
requests, and documentation requests. For more general questions
132133
and support, try one of the following channels maintained by the
133134
DELPH-IN community:
134135

@@ -162,20 +163,20 @@ requests. Also thanks to the users of PyDelphin!
162163
### Related Software
163164

164165
* Parser/Generators (chronological order)
165-
- LKB: http://moin.delph-in.net/LkbTop (also: http://moin.delph-in.net/LkbFos)
166-
- PET: http://moin.delph-in.net/PetTop
166+
- LKB: https://github.com/delph-in/docs/wiki/LkbTop (also: https://github.com/delph-in/docs/wiki/LkbFos)
167+
- PET: https://github.com/delph-in/docs/wiki/PetTop
167168
- ACE: http://sweaglesw.org/linguistics/ace/
168-
- agree: http://moin.delph-in.net/AgreeTop
169+
- agree: https://github.com/delph-in/docs/wiki/AgreeTop
169170
* Grammar profiling, testing, and analysis
170171
- \[incr tsdb()\]: http://www.delph-in.net/itsdb/
171172
- gDelta: https://github.com/ned2/gdelta
172173
- Typediff: https://github.com/ned2/typediff
173174
* Software libraries and repositories
174-
- LOGON: http://moin.delph-in.net/LogonTop
175+
- LOGON: https://github.com/delph-in/docs/wiki/LogonTop
175176
- pydmrs: https://github.com/delph-in/pydmrs
176177
* Also see (may have overlap with the above):
177-
- http://moin.delph-in.net/ToolsTop
178-
- http://moin.delph-in.net/DelphinApplications
178+
- https://github.com/delph-in/docs/wiki/ToolsTop
179+
- https://github.com/delph-in/docs/wiki/DelphinApplications
179180

180181
### Spelling
181182

delphin/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# the warehouse project:
44
# https://github.com/pypa/warehouse/blob/master/warehouse/__about__.py
55

6-
__version__ = '1.5.1'
6+
__version__ = '1.6.0'
77
__version_info__ = __version__.replace('.', ' ').replace('-', ' ').split()
88

99
__title__ = 'PyDelphin'

delphin/ace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ def generate(grm: util.PathLike,
571571

572572
# The following defines the command-line options available for users to
573573
# specify in ACEProcess tasks. For a description of these options, see:
574-
# http://moin.delph-in.net/AceOptions
574+
# https://github.com/delph-in/docs/wiki/AceOptions
575575

576576
# thanks: https://stackoverflow.com/a/14728477/1441112
577577
class _ACEArgumentParser(argparse.ArgumentParser):

delphin/cli/process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def call_process(args):
5757
)
5858
parser.add_argument(
5959
'-o', '--options', metavar='OPTIONS', type=str, default='',
60-
help='ACE options (see http://moin.delph-in.net/AceOptions)'
60+
help='ACE options (see https://github.com/delph-in/docs/wiki/AceOptions)'
6161
)
6262
parser.add_argument(
6363
'-s', '--source', metavar='PATH',

0 commit comments

Comments
 (0)