Thanks for helping improve the Climate REF training notebooks.
The notebook set is designed to grow. To add one:
- Pick the next number. Notebooks use a two-digit prefix
(
05-your-topic.ipynb) innotebooks/. The number defines reading order. - Write the notebook. Keep it focused on a single learning goal.
State prerequisites in the first markdown cell.
Reuse the
ref_tutorialshelper package rather than repeating client/plotting boilerplate. - Add an index row. Add the notebook to the table in
README.md. - Leave outputs in. Notebook outputs are intentionally committed so the notebooks render on GitHub. Run the notebook top-to-bottom before committing so the saved outputs are current.
- Check it passes CI (below).
Shared logic lives in src/ref_tutorials.
It has a deliberately small, stable interface.
New helpers should be pure and testable where possible.
Add a unit test in tests/ for any non-trivial logic.
uv sync --extra dev
# Lint
uv run ruff check .
# Unit tests for the helper package
uv run pytest tests
# Execute every notebook end-to-end (needs the generated client + internet)
uv run bash scripts/generate_client.sh
uv run pytest --nbmake notebookspyproject.toml is the source of truth, managed with uv.
After changing dependencies,
the pre-commit hook will update the requirements.txt file which is used by Binder.
Every pull request runs three jobs: lint, helper-package unit tests, and full notebook execution. A weekly scheduled run catches drift against the live REF API even when the repo is idle.