distance_explainer developer documentation
If you’re looking for user documentation, start from the documentation home.
Development install
python3 -m venv env
source env/bin/activate
python3 -m pip install --upgrade pip setuptools
python3 -m pip install --no-cache-dir --editable ".[dev]"
Running tests
pytest -v
Or using tox (install separately with pip install tox):
tox
Test coverage
coverage run && coverage report
Running linters
ruff check .
To run linters automatically on commit, enable the git hook:
git config --local core.hooksPath .githooks
Versioning
Bump the version across all files with bump-my-version:
bump-my-version bump major
bump-my-version bump minor
bump-my-version bump patch
Making a release
Releases are fully automated via GitHub Actions. To make a release:
Create a GitHub Release with a new tag.
The workflow automatically builds and uploads the package to PyPI.
For a test upload to TestPyPI, manually trigger the Build and upload to PyPI workflow via the GitHub Actions UI with workflow_dispatch.
Generating the API docs
cd docs
make html
Documentation will be in docs/_build/html. If you don’t have make:
sphinx-build -b html docs docs/_build/html