Summary
Installing the udtools package from source / a git tag produces a wheel that contains none of the data/*.json files the validator needs, so validation fails immediately with FileNotFoundError: .../udtools/data/upos.json. Only the pre-built PyPI wheel works.
Reproduction
pip install "git+https://github.com/UniversalDependencies/tools.git@r2.18#subdirectory=udtools"
echo -e "# sent_id = 1\n# text = X\n1\tX\tx\tNOUN\t_\t_\t0\troot\t_\t_\n" | python -m udtools ... # or via Validator()
Result:
FileNotFoundError: [Errno 2] No such file or directory: '.../site-packages/udtools/data/upos.json'
Cause
pyproject.toml declares:
[tool.setuptools.package-data]
udtools = ["data/*.json"]
but there is no udtools/src/udtools/data/ directory in the repository (the data/*.json files appear to be generated from the UD docs at release time and bundled only into the published PyPI wheel). When building from the repo, the glob matches nothing, so the resulting wheel/sdist ships without upos.json, feats.json, deprels.json, edeprels.json, etc.
Impact: it's not possible to pip install a working validator from source or from a release tag — only the published PyPI artifact functions.
Secondary issue: version not bumped per tag
The r2.18 tag's pyproject.toml still declares version = "0.2.7", identical to the older PyPI 0.2.7 release — even though the code differs (e.g. the level2.py Warning import is present on the tag but absent in the PyPI 0.2.7 wheel; see companion issue). This makes the two indistinguishable by version.
Suggestions
- Either commit the generated
data/*.json into the package source, or document/automate the generation step so a from-source build includes them (e.g. a build hook).
- Bump the package version for each release/tag so installed builds are distinguishable.
Summary
Installing the
udtoolspackage from source / a git tag produces a wheel that contains none of thedata/*.jsonfiles the validator needs, so validation fails immediately withFileNotFoundError: .../udtools/data/upos.json. Only the pre-built PyPI wheel works.Reproduction
Result:
Cause
pyproject.tomldeclares:but there is no
udtools/src/udtools/data/directory in the repository (thedata/*.jsonfiles appear to be generated from the UD docs at release time and bundled only into the published PyPI wheel). When building from the repo, the glob matches nothing, so the resulting wheel/sdist ships withoutupos.json,feats.json,deprels.json,edeprels.json, etc.Impact: it's not possible to
pip installa working validator from source or from a release tag — only the published PyPI artifact functions.Secondary issue: version not bumped per tag
The
r2.18tag'spyproject.tomlstill declaresversion = "0.2.7", identical to the older PyPI 0.2.7 release — even though the code differs (e.g. thelevel2.pyWarningimport is present on the tag but absent in the PyPI 0.2.7 wheel; see companion issue). This makes the two indistinguishable by version.Suggestions
data/*.jsoninto the package source, or document/automate the generation step so a from-source build includes them (e.g. a build hook).