Contributing
Dev setup
The dev extra adds pytest to the standard install.
Running tests
All 101 tests must pass before committing. Tests are fully offline — no real network
calls are made (HTTP sources are mocked with unittest.mock.patch).
Test conventions
- Fixtures live in
tests/conftest.py. - Use
unittest.mock.patch("requests.get", ...)to mock HTTP sources.
Adding a new data source
- Create
src/geobn/sources/my_source.pyfollowing theDataSourceABC. - Export from
src/geobn/sources/__init__.pyandsrc/geobn/__init__.py. - Add tests to
tests/test_sources.py.
Every source must implement:
If the source requires credentials, validate them in __init__() before fetch() is called.
Building docs locally
Build static site and check for broken links:
The --strict flag treats mkdocstrings warnings (missing symbols, broken links) as
errors.
Git workflow
After completing any meaningful unit of work, commit and push:
Rules:
- Stage only relevant files (never git add -A blindly)
- Write concise, present-tense commit messages: "add WCSSource", "fix nodata sentinel"
- Always run uv run pytest tests/ -v before committing
GitHub Actions deploys docs automatically on push to main.