Chart the probes and each model's passes by conservation law on the site - #156
Merged
Merged
Conversation
The probes section gains a pie of the merged probes by law. The models section gains three compact panels, one per law, with the models as rows. Each panel is on its own scale: its full width is every probe under that law, the gray bar is how many could score the model, and the fill in the law's color (blue, orange, green) is how many it passed. A small law like momentum is as readable as mass that way. Each cell has a hover and focus tooltip, and a details table gives the numbers. Both charts work in en/es/zh, in both themes and at phone width, where the numbers move to the tooltip and the table. The colors are validated for color-vision deficiency on both surfaces. The data is a JSON block inside site/index.html, so the page stays one self-contained file. scripts/site_standings.py writes it from models/result.csv, by the same standing rule as _archived_standings, with each probe's law read from its probe.yaml. test_docs_in_sync now fails when the block is stale or disagrees with that standing. The AGENTS.md checklist says when to run the script. The probe workflow now also runs on pull requests that touch site/, scripts/ or tests/, so a stale chart or table is caught before the pages workflow deploys it.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The light-theme mass-slice label does not meet minimum text contrast requirements.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Adds localized, responsive charts showing probe distribution and model performance by conservation law.
Changes:
- Adds accessible pie and bar charts with generated standings data.
- Introduces archive-driven chart generation and consistency tests.
- Expands CI paths and documents chart refresh steps.
| File | Description |
|---|---|
site/index.html |
Adds chart UI, translations, data, and rendering logic. |
scripts/site_standings.py |
Generates chart data from probes and archived results. |
tests/test_docs_in_sync.py |
Verifies chart data against the archive. |
.github/workflows/probe-pr.yml |
Runs validation for site, script, and test changes. |
AGENTS.md |
Documents chart refresh requirements. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot's review on #156 caught that the label picker chose white on the light-mode mass blue (#2A78D6) at 4.42:1, short of the 4.5:1 WCAG AA asks of 14px text, because the darker candidate was the site's ink rather than black, and the ink only reached 3.66:1 there. Against white and true black one of the two always clears 4.5:1. Every slice now does: 4.76 to 6.56:1 in light mode, 5.41 to 7.46:1 in dark.
Barbhuiya12
added a commit
to Barbhuiya12/hydroturing
that referenced
this pull request
Oct 2, 2026
…nowpack-ripening Conflicts in README.md, models/result.csv and site/index.html. Counts are re-derived for both probes: thirty-six, twenty-three mass, eight energy, five momentum. The flowchart keeps main's taller pillars with the ripening entry in the energy one. sacsma_snow17 1.2.0 is archived on mass/groundwater-datum-invariance (N/A) after main's 1.1.0 row, and modflow6 6.7.0-adapter.2 on this probe (N/A); the site chart data is regenerated with scripts/site_standings.py.
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.

Adds two charts to the site.
Probes: a pie of the 35 merged probes by law: mass 23, energy 7, momentum 5. Counts sit on the slices, and the legend gives percentages that sum to 100.
Models: three compact panels, one per law, with the models as rows in the same order as the models table.
N / M. A dash means no probe under that law could score the model.Each cell has a hover and keyboard-focus tooltip (for example, summa: 1 of 4 energy probes passed, 3 N/A). Escape dismisses it. "Show the numbers" opens the per-law counts as a table.
Both charts work in en/es/zh, in light and dark mode, and at phone width. On a phone the per-cell numbers move to the tooltip and the table, and model names wrap at underscores. The law colors are checked for color-vision deficiency on both surfaces. Green
#008300failed against the orange for protanopia, so the green is#22A06Bin light mode and#1BAF7Ain dark.Keeping it current
The page stays one self-contained file. The chart data is a JSON block in
site/index.html, written by a new stdlib-onlyscripts/site_standings.pyfrommodels/result.csv._archived_standings: the newest archived version per model, with N/A excluded. Each probe's law is read from itsprobe.yaml.python3 scripts/site_standings.py.--checkexits 1 when the block is stale.tests/test_docs_in_sync.py::test_site_charts_are_drawn_from_the_archivefails when the block is stale, when a law is miscounted, when a model is missing, or when a model's per-law sums differ from the standing the tables are checked against.The
probeworkflow now also runs on pull requests that touchsite/,scripts/ortests/, so a stale chart or table is caught before the pages workflow deploys it. Before this, such PRs skipped CI.Checked
pytest -q: 1279 passed.probe.yaml;