Repository navigation
docs: the outputs and checking guides run on a sample project - #220
Merged
Merged
Conversation
docs/_ext/docs_examples.py holds what the running pages need: where the tests' met files are (STILT_TEST_MET_DIR, or tests/met_cache), a temporary working folder, and a sample project, built the first time a page asks for it and copied into the page's folder. The sample is four receptors an hour apart on the morning of 15 January 2021, run on that met: about 40 s once per docs build, kept under docs/_build so `just docs-serve` reuses it. The Getting Started page's hidden setup now calls it. AGENTS.md describes the helper, and CHANGELOG has an entry for the series. Part of #116.
The guide opens a project, so it starts from the sample project: the footprint, particle and simulation maps, the facet and availability plots, the footprint's receptor, grid and settings, the NetCDF round trip, the particle table, and the selection of many simulations, with the output each prints. Its examples use the sample's day, 15 January 2021, in place of July 2023. Running it corrected two examples. `rid` was never defined, so the line that used it failed; it is now `morning.receptor.iloc[0]`. And the mean footprint, plotted on a linear scale, is one bright cell on a dark square, because most cells are 0; it is now drawn on a log scale, as the trajectory-analyses guide does. Two examples stay plain code: the file path, whose settings folder name is an example, and the `scene` selection, which needs a column the sample does not have. Part of #116.
`project.status()` and the particle and footprint maps of "My footprint looks wrong" run on the sample project and show what they print and draw. The sample has no failures, so the table of failed simulations is empty, and the page says so. The empty-footprint example stays plain code: the sample has no empty footprint. Part of #116.
receptor.plot.map() wrote "m AGL" beside a column and "Height AGL (m)" on a multipoint receptor's colorbar, whatever the receptor's altitude_ref was. The guide's own column example is in MSL, and its map said AGL. Both labels now use the receptor's reference. Two tests, one for each, fail on the old code. Part of #116.
The point, column and multipoint examples run and end with `receptor.plot.map()`, so the page shows what each receptor type looks like on a map. They need no simulation. Part of #116.
Owner
Author
|
Rebased onto |
jmineau
force-pushed
the
docs/116-sample-project
branch
from
October 11, 2026 04:33
63478fb to
21cfb5c
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The guides that open a project now run when the docs are built, on a small sample project. Part of #116.
The sample project is four receptors an hour apart on the morning of 15 January 2021, run on the same cached HRRR files as the Getting Started page. It is built the first time a page asks for it, about 40 s once per docs build, and copied into a temporary folder for each page that uses it, so a page's files never land in the repository.
just docs-servekeeps it between rebuilds.docs/_ext/docs_examples.pyholds the setup, and the Getting Started page uses it too.What runs now:
project.status()and the particle and footprint maps of "My footprint looks wrong". The sample has no failures, so the failed table is empty, and the page says so.receptor.plot.map(). These need no simulation.Running them corrected three things.
rid, in the outputs guide, was never defined, so the line that used it could not run. The mean footprint on a linear scale is one bright cell on a dark square, because most cells are 0; it is now drawn on a log scale, as the trajectory-analyses guide does. Andreceptor.plot.map()labeled the guide's own column example, whose heights are above sea level, with "m AGL", and a multipoint receptor's colorbar always said "Height AGL". Both labels now use the receptor's reference (own commit, two tests that fail on the old code).Left as plain code: the particle file path, whose settings folder name is an example, the
sceneselection, which needs a column the sample does not have, and the empty-footprint example, since the sample has none. The trajectory-analyses guide needs your own measurements and a second met, so it is untouched.Cost. A clean
just build-docstakes about 165 s on a compute node, against about 95 s with the Getting Started page and 60 s before.just quality-check(1,285 tests, one fewer per example that now runs instead of being compiled) and all the pre-commit hooks pass.Three layout problems in the plots these pages now show are in #219: the legend of
sim.plot.map(), the label ofproject.plot.availability(), and the facet title. I left them, since the layout is a design choice.Based on #218: its two commits come first, and the rest are this PR's. I will rebase it onto
mainwhen #218 merges.