Development#
See CLAUDE.md in the repository root for the full coding conventions.
Test levels#
Level |
Command |
What runs |
|---|---|---|
quick |
|
Unit tests with no network, in under 30 s |
install |
|
Adds settings-file layering, every module imports cleanly, CLI, wheel build and install, docs build |
full |
|
Adds every remote source contacted at the first and last date of its time range |
Tests in tests/install and tests/full are marked automatically. Mark a
long test in any directory with @pytest.mark.slow; slow tests run at the
install level and above.
Docs#
uv run --group docs sphinx-build -b html docs docs/_build/html
NumPy-style docstrings are rendered by napoleon. A new public function
needs no extra step: the API pages are generated by autosummary.
Releasing#
The version lives only in pyproject.toml; seagrid.__version__ and the
docs read it from the installed package. Change it with uv version, which
also updates uv.lock:
uv version --bump patch # 2.5.1 -> 2.5.2 (or minor, major)
uv version --bump minor --bump dev # 2.5.1 -> 2.6.0.dev1, between releases
uv version --bump stable # 2.6.0.dev1 -> 2.6.0
uv version 2.6.0 # an exact version
Add --dry-run to see the result without changing anything.
To release:
Bump the version with
uv version(above).Rename the
## X.Y.Z (unreleased)heading indocs/changelog.mdto## X.Y.Z (YYYY-MM-DD).Run the tests:
uv run pytest --level=install(andruff,mypy).Commit and tag:
git commit -am "Release X.Y.Z" git tag -a vX.Y.Z -m "seagrid X.Y.Z"
Build, check and upload (the token is read from
UV_PUBLISH_TOKEN):rm -rf dist && uv build uvx twine check dist/* uv publish dist/seagrid-X.Y.Z*
PyPI never accepts the same version twice; a fix needs a new version.
Push the branches and the tag (see
CLAUDE.md, Releasing, for GitHub).