Skip to content

Contributing

Bug reports, questions and pull requests are welcome on GitHub. For a larger change, open an issue first to agree on the approach.

Set up

dpm-xbrl uses uv:

git clone https://github.com/luukhopman/dpm-xbrl
cd dpm-xbrl
uv sync --all-extras

Check a change

uv run pytest                      # tests, including every docs example
uv run ruff check
uv run ruff format --check
uv run ty check
uv run python scripts/build_docs.py  # strict docs build into site/

uv run zensical serve previews the documentation while you edit it.

Conventions

  • Every behaviour has a test. Fixtures are built in code by tests/support.py; keep them small.
  • Public functions and classes have Google-style docstrings; they are the API reference.
  • The core package has no runtime dependencies. Optional ones go in an extra.
  • Keep __all__, the docs and the changelog in step with the code. Examples in the docs are run by tests/test_docs.py, so show real output.
  • The sample reports in docs/samples are generated by tests/docs_samples.py; regenerate them with uv run python -m tests.docs_samples after changing it.
  • Commit messages follow Conventional Commits, such as fix(csv): reject an empty table header.

AGENTS.md in the repository holds the same information for coding agents.