Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 2.35 KB

CONTRIBUTING.md

File metadata and controls

56 lines (41 loc) · 2.35 KB

Contributing

Thanks for helping. This is a small library, so the process is light.

Set up

uv sync --all-groups        # install deps + dev tools
uv run ruff check .         # lint
uv run ruff format --check .
uv run mypy                 # strict: package, tests, scripts, tools
uv run pytest               # warnings are errors; real network access fails the test
uvx pre-commit install      # optional: run ruff and mypy on every commit

All of these must pass; CI runs the same commands on Python 3.11 to 3.14 and also builds the wheel. The docs site is built with uv run --group docs mkdocs build --strict.

Generated files: do not hand-edit

  • reportnet_api/models/generated.py is generated from spec/api-docs.json (scripts/regen_models.sh).
  • reportnet_api/resources/*.py are generated by scripts/generate_resources.py (scripts/regen_resources.sh), except the hand-written *_ext.py modules.
  • docs/reference/*.md is generated (scripts/regen_docs.sh) from the code, the spec and the notes in scripts/docs_caveats.py.

A manual fix to a generated file is silently lost on the next regeneration. Fix the generator, the template or docs_caveats.py instead, regenerate, and commit the regenerated output separately from hand-written changes.

Tests and live behaviour

  • Add a mocked test (respx) for every change in behaviour.
  • Statements about what the live API does belong in docs/live_testing_notes.md with the date and how it was observed. Mark anything unverified as unverified.
  • Never commit tokens, API keys, response captures or real dataflow/dataset ids, and keep personal data (emails, names) out of tests and docs: use example.org.
  • Please do not run write or delete calls against a dataflow you do not own.

Versions, releases and the changelog

Supported Python versions follow the upstream support window: when a Python version reaches end of life it is dropped from requires-python, the classifiers and the CI matrix. Add a line to CHANGELOG.md for every user-visible change; releases are described in docs/RELEASING.md.

Code of conduct

See CODE_OF_CONDUCT.md.

Pull requests

Keep them small and focused, explain the reason for the change, and update the README or reference where behaviour changes. By contributing you agree your work is released under the project's MIT license.