Thanks for wanting to contribute.
This project uses uv and hatchling.
Install uv, then:
git clone https://github.com/GClunies/noaa_coops.git
cd noaa_coops
uv sync --locked --all-extras --group devThat creates a .venv/ and installs the runtime deps plus the dev toolchain
(pytest, pytest-cov, pytest-recording, mypy, ruff, responses,
type stubs).
# Default: offline, deterministic, <2s. Replays recorded VCR cassettes.
uv run pytest
# Run the nightly live canary locally (hits the real NOAA API):
uv run pytest -m live
# Re-record cassettes after intentional NOAA drift or a new test:
uv run pytest --record-mode=rewrite # rebuild every cassette
uv run pytest --record-mode=new_episodes # record only new callsCassettes live at tests/cassettes/test_station/*.yaml. Commit them
alongside any test changes that touch the live path.
uv run ruff check .
uv run ruff format .
uv run mypy noaa_coopsThese all run in CI on every PR. Pre-commit is also wired up via pre-commit.ci — style issues get auto-fixed on inbound PRs.
Before requesting review:
- Tests pass:
uv run pytest - Ruff clean:
uv run ruff check .anduv run ruff format --check . - Mypy clean:
uv run mypy noaa_coops - New or modified behavior has test coverage
- If you touched the live API path, re-recorded cassettes
- PR description explains the why, not just the what
Releases are cut manually via the GitHub Actions UI.
- Bump
__version__innoaa_coops/__init__.py(e.g.0.5.0→0.6.0). - Update
CHANGELOG.md— move the Unreleased section under the new version with today's date, and start a fresh## [Unreleased]header. - PR, review, merge to
main. - Actions → Test Publish → Run workflow. Confirms the wheel installs cleanly from TestPyPI.
- Actions → Publish → Run workflow. Publishes to PyPI, creates the
v{VERSION}git tag, and cuts a GitHub Release with a changelog auto-generated fromgit log $PREV_TAG..HEAD.
Each step validates semver format and refuses to run if the tag already exists.
.github/workflows/nightly.yml runs pytest -m live on a daily cron. If it
fails, it opens (or updates) a nightly-canary-labeled issue — real NOAA
drift is visible without spamming the inbox.
Open an issue with the bug
report template. Include the Python version, noaa_coops version, and a
minimal reproduction.