Skip to content

docs: the outputs and checking guides run on a sample project - #220

Merged
jmineau merged 5 commits into
mainfrom
docs/116-sample-project
Oct 11, 2026
Merged

jmineau merged 5 commits into
mainfrom
docs/116-sample-project

Conversation

@jmineau

@jmineau jmineau commented Oct 10, 2026

Copy link
Copy Markdown
Owner

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-serve keeps it between rebuilds. docs/_ext/docs_examples.py holds the setup, and the Getting Started page uses it too.

What runs now:

  • The outputs guide: 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 selecting many simulations, each with the output it prints. Its examples use the sample's day in place of July 2023.
  • The checking guide: 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.
  • The receptors guide: the point, column and multipoint examples end with 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. And receptor.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 scene selection, 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-docs takes 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 of project.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 main when #218 merges.

Base automatically changed from docs/116-built-plots to main October 11, 2026 04:32
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.
@jmineau

jmineau commented Oct 11, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto main now that #218 is merged: the five commits of this PR, no conflicts, the same changes as before (+265 -51 in 9 files).

@jmineau
jmineau force-pushed the docs/116-sample-project branch from 63478fb to 21cfb5c Compare October 11, 2026 04:33
@codecov

codecov Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
src/stilt/visualization.py 94.79% <100.00%> (ø)

@jmineau
jmineau merged commit 19f7b90 into main Oct 11, 2026
14 checks passed
@jmineau
jmineau deleted the docs/116-sample-project branch October 11, 2026 05:20
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