Development¶
Setup environment¶
We use UV to manage the development environment and production build.
Run tests¶
Lint and format¶
To auto-format:
Build docs locally¶
Keeping variable docs in sync¶
The variable mapping dicts (WRF_VARIABLE_MAPPING, ERA5_VARIABLE_MAPPING) are the source of
truth for supported variables. A helper checks that every mapped variable is documented in the
reference pages with a matching cfdb name:
uv run python scripts/check_var_docs.py # report drift (exit 1 if stale)
uv run python scripts/check_var_docs.py --rows # also print paste-ready rows for new variables
This runs automatically in CI via cfdb_ingest/tests/test_docs_sync.py, so adding a variable to a
mapping without documenting it will fail the test suite. After adding a variable, run with --rows
to get a starting table row, paste it into the matching docs/reference/*-variables.md page, and
fill in the source/transform/description columns.