Development¶
Running the test suite¶
Install the test dependencies (see Installation) and run:
pytest -n auto -v tests/
Three test groups exist:
Directory |
What is tested |
|---|---|
|
Core logic: grid handling, clipping, unrotation, attribute addition |
|
Path construction and date-range file selection |
|
Per-dataset request processing — requires access to |
CI/CD¶
Pipeline |
Trigger |
What it does |
|---|---|---|
GitHub Action |
Push |
Runs the full pytest suite on |
GitHub Action |
Push (non- |
Auto-formats Python files with PEP 8 style and pushes the result back to the branch. |
GitHub Action |
Push to |
Builds this Sphinx site and deploys it to the |
GitHub Action |
PR opened/updated, touching the same paths as |
Builds the site and deploys it to |
Generating the frontend’s dataset metadata (file_tree_*.json,
meta_*.json) used to run here as the Jenkins FileIndex and
FileSizeNumber jobs; that logic and its scheduled GitHub Actions workflows
now live in C2SM/iac-metadata.
Versioning¶
The package version is derived automatically from the latest git tag via
setuptools_scm (see
[tool.setuptools_scm] in pyproject.toml) — src/zephyr/_version.py is
generated at install/build time and is not tracked in git. There’s no file
to bump by hand; cutting a release is just tagging the commit.
Building the documentation locally¶
This site is built with Sphinx, using
MyST Markdown so pages are plain
.md files.
uv sync --extra docs
uv run sphinx-build -b html docs docs/_build/html
Then open docs/_build/html/index.html in a browser. To rebuild and
reload the browser automatically on changes, use tools/serve_docs.sh
instead, which serves the site at http://127.0.0.1:8000:
tools/serve_docs.sh
(Under the hood this runs sphinx-autobuild, which isn’t pinned in
pyproject.toml and is pulled in ad hoc via uv run --with.)
Contributing¶
Formatting is enforced automatically by the
autoyapfGitHub Action — you don’t need to run a formatter locally before pushing to a non-mainbranch.Add tests alongside new logic in the matching
tests/subdirectory (see the table above); anything touching file discovery or extraction that needs real data belongs intests/requests/and will only run in CI (or locally on an IAC machine).Keep this documentation in sync: if you change the request schema, supported datasets, or the processing flow, update the relevant page under
docs/in the same PR.