For Developers¶
This package uses the Poetry packaging system.
Development is easiest with the just
command runner; running just -l
will list all available recipes, while just
-n <recipe>
will print the commands that the recipe would run.
Running checks and tests¶
-
just check
will run black, ruff, mypy, and some other pre-commit hooks on all files in the repo.just install-hooks
will install pre-commit hooks so they run on every attempted commit.
-
just test-all
will run all tests except for tests that run on the full Anthology data.just test NAME
will only run test functions withNAME
in them.just test-integration
will run tests on the full Anthology data.
-
just fix-and-test
(orjust ft
for short) will run all checks and tests, additionally re-running the checks on failure, so that the checking and testing will continue even if some hooks have modified files. -
The justfile defines several more useful recipes; list them with
just -l
!
Running benchmarks¶
There are some benchmark scripts intended to be run with richbench:
poetry run richbench benchmarks/
Generating and writing documentation¶
just docs
generates the documentation in thesite/
folder.just docs-serve
serves the documentation for local browsing.
Docstrings are written in Google style as this supports the most features with the mkdocstrings handler (particularly compared to Sphinx/reST).
Project layout¶
acl_anthology/ # Main package directory.
benchmarks/ # Benchmark scripts.
docs/ # The mkdocs documentation.
tests/ # Pytest tests.