Skip to content

Build robustness: pinned meteo stations, execute notebooks once, conduct contact - #5

Merged
retomarek merged 3 commits into
mainfrom
chore/build-robustness
Nov 6, 2026
Merged

retomarek merged 3 commits into
mainfrom
chore/build-robustness

Conversation

@retomarek

Copy link
Copy Markdown
Owner

Small follow-ups to make the book build more robust.

Changes

  • meteoData.ipynb: the downloads no longer depend on "nearest station" lookups, which can change when a station opens or closes (this broke a deploy before). Agrometeo data now comes from the fixed station 239 (Meggen) for the fixed past week 2026-06-01 to 2026-06-07; MeteoSwiss already used the fixed station LUZ. The find_nearest_station() lookups are still shown, but their result is not used for the download. download_data_by_plz() is shown as a code example that is not executed. Checked by running: 168 hourly rows, 4 sensors (global radiation is missing at night, as before).
  • Execution once per build: execute_notebooks: cache. The first build stores the executed notebooks in edap/_build/.jupyter_cache, the second one (HTML after PDF) reuses them. Before, this only worked because Sphinx reused its pickled environment; any config difference between the two builds would have re-executed everything. The runner starts empty, so PR, weekly and deploy runs still execute every notebook against the live data sources. A failing notebook still fails the -W build (tested with a notebook that raises an error).
  • CONDUCT.md: updated from Contributor Covenant 1.4 to 2.1 (unchanged otherwise) and added how to report: privately via GitHub's "Report content" (to repository admins) or GitHub's abuse reporting, otherwise in a discussion. No email address.

Local checks

  • Full build from a clean _build with execution and -W --keep-going: 0 warnings, about 100 s.
  • singlehtml then html: the notebooks execute once (104 s), and the second build takes 3 s. A rebuild that re-reads all sources (--all) uses the cache: 0 executions, 5 s.
  • Workflow and _config.yml parse as YAML.

🤖 Generated with Claude Code

retomarek and others added 3 commits November 6, 2026 10:37
…on lookups

Download Agrometeo data from station 239 (Meggen) for a fixed past week
instead of feeding find_nearest_station() into download_data(), and show
download_data_by_plz() as a non-executed example. The lookups are still
demonstrated; MeteoSwiss already uses the fixed station LUZ.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switch execute_notebooks to "cache" so the HTML build after the PDF build
(and local rebuilds) reuse the executed outputs from
_build/.jupyter_cache instead of relying on the Sphinx environment.
A failing notebook still fails the -W build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reports go to the maintainer via GitHub: privately with "Report content"
(to repository admins) or GitHub's abuse reporting, otherwise in a
discussion. No email address.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@retomarek
retomarek merged commit 8e62392 into main Nov 6, 2026
2 checks passed
@retomarek
retomarek deleted the chore/build-robustness branch November 6, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant