Development
Development tasks are automated with tox, following
the setup of FAIRMD_lipids.
Install tox once (pip install tox) and run from the repository root:
tox # default: lint, build, tests
tox -e tests # run the test-suite with pytest
tox -e lint # ruff format check, ruff check, sphinx-lint
tox -e format # apply ruff formatting and auto-fixes
tox -e build # build sdist/wheel, twine check, check-manifest
tox -e docs # build the HTML documentation
Arguments after -- are passed on, e.g. tox -e tests -- -k buffer.
Environments
testsInstalls the package in editable mode with
pytestandpytest-covand runs the tests intests/.NMLDB_ROOT_PATHis set to the repository root so thatfairmd.idpcan be imported.lintandformatruff is configured in
pyproject.toml(line length 120, rule setsE,F,B,I). The linted folders aresrc/,Scripts/,tests/anddocs/src/.sphinx-lintchecks the reStructuredText sources. The same checks can run before every commit through pre-commit (pre-commit install).buildBuilds the distribution and verifies that the sdist contains exactly the files tracked in git that are not excluded in
MANIFEST.in.docsRuns
docs/src/run_apidoc.pyto generate the API pages and thensphinx-build. The output is indocs/build/html. Seedocs/README.mdfor details.
Published documentation
The documentation is published on GitHub Pages at
https://ohsollila.github.io/IDPdatabank/ by the Docs workflow
(.github/workflows/docs.yml). Every pull request builds the
documentation as a check; every push to master (or a manual run of the
workflow from the Actions tab) builds it and deploys the result.
The same configuration can also be built by Read the Docs through
.readthedocs.yaml.
Continuous integration
The GitHub workflows in .github/workflows run tox -e lint,
tox -e build, tox -e tests and tox -e docs on pull requests.