fix: the notation page is generated again, and something says so - #41
Merged
Merged
Conversation
`tools/notation.py` could not run in this repository. Its `PIECEWISE` map names four models that stayed behind in lpspec when the language was extracted (#17), so `_curves()` raised `FileNotFoundError` and the only way to touch the page was by hand — which is how a generated page ends up showing math no model here produces. Nothing caught it because nothing ran the tool: `--check` has never been called by a test or a workflow, in this repository or the one it came from. So the page has been drifting since the extraction with the guard it claims in its own docstring — `tests/test_docs_site.py` — not existing here at all. - **The four models come back**: `examples/piecewise.yaml`, `examples/sos.yaml`, `examples/piecewise_lp.yaml` and `examples/ports/transport_pwl.yaml`, one per `method:`, each carrying the licence header this repository's examples carry. They render against this language unchanged, and the page they regenerate is byte-identical to the curve rows already committed — so what they restore is the ability to check the page, not the page. - **The page is prettier-ignored**, the rule `docs/examples/` already follows: the generator writes unpadded legend tables, prettier pads them, and each undoes the other, so the committed file could never satisfy both. It has been losing that argument silently since the tables were first generated — the bytes here are what the generator writes, which is why the guard can exist. - **Two guards** in `tests/test_docs.py`, beside the one `docs/examples/` already has: the page matches `rendered_page()`, and `PIECEWISE` covers `PIECEWISE_METHODS`, which is the claim the docstring makes about it. The docstring's other two claims were stale as well: four methods, not three, and a section showing one of them is a quarter of the construct rather than a third. `tools/render_tex.py` globs `examples/**/*.yaml`, so the LaTeX gate now renders and compiles nineteen models rather than fifteen.
FBumann
force-pushed
the
claude/notation-curve-models
branch
from
August 23, 2026 07:56
9739386 to
931d173
Compare
FBumann
marked this pull request as ready for review
August 23, 2026 07:56
This was referenced Aug 23, 2026
FBumann
pushed a commit
that referenced
this pull request
Aug 23, 2026
Commenting `examples/symbols/dispatch.yaml` — a table whose three parameter entries are italic, which the convention says they should not be — turned up two things worth more than the comment. **The homepage was stale, and nothing was holding it.** `docs/index.md` and `README.md` carry `examples/dispatch.yaml` rendered two ways, written by `tools/home_math.py`, and no test or workflow ran its `--check`. The upright convention changed how a parameter prints and the page kept the old math with every test green — the same failure `tools/notation.py` had until #41, on the page a reader arrives at first. It has the same guard now, and the guard was checked against a perturbed page rather than assumed. **The note contradicted itself there.** It quotes the model's own first parameter, and on that page the first parameter is `\bar p` — italic, because the table says so — under a sentence claiming a parameter is upright. So the note now quotes only symbols the *derivation* produced, and is suppressed where a table has taken over the ones it would have quoted. A table is printed verbatim and is the author's to write; a symbol it supplies is not one the note governs. Which is what the comment says, in the file that earns it: entries are the reader's notation to choose, and the same property is what lets an author whose preamble loads `upgreek` write `\upeta` for a parameter the derivation has to spell out.
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.
Targets
maindirectly. Nothing here depends on #31 — it was stacked only because both touchdocs/reference/notation.md, and that file is generated, so the overlap is a regeneration rather than a merge. Landing it first is what lets CI check #31's and #33's pages instead of a person doing it.What this changes
tools/notation.pycould not run in this repository. ItsPIECEWISEmap names four models that stayed behind influxopt/lpspecwhen the language was extracted (#17), so_curves()raisedFileNotFoundErrorand the only way to touch the page was by hand — which is how a generated page ends up showing math no model here produces.Nothing caught it because nothing ran the tool.
--checkhas never been called by a test or a workflow, here or in the repository this came from, and the guard the docstring claims —tests/test_docs_site.py— does not exist here at all. So the page has been drifting since the extraction with nothing able to say so.The four models come back.
examples/piecewise.yaml,examples/sos.yaml,examples/piecewise_lp.yaml,examples/ports/transport_pwl.yaml— one permethod:, each given the licence header this repository's examples carry (upstream's have none). They load and render against this language unchanged, and the page they regenerate is byte-identical to the curve rows already committed. So what they restore is the ability to check the page, not the page.The page is prettier-ignored, the rule
docs/examples/already follows for exactly this reason: the generator writes unpadded legend tables, prettier pads them, and each undoes the other, so the committed file could never satisfy both.docs/reference/notation.mdwas not on that list, so every regeneration since has been padded back by the hook and the generator's output has never been what the file holds — which is why nothing could compare them. The whole page diff here is that unpadding, plus the two blank lines around the markers; no rendered math changes.Two guards, in
tests/test_docs.pybeside the onedocs/examples/already has:test_the_notation_page_is_currentrendered_page(), byte for bytetest_every_piecewise_method_has_a_model_on_the_notation_pagePIECEWISEcoversPIECEWISE_METHODS— the claim the docstring makes about itAlso stale, in the same docstring
Four methods, not three, and a section showing one of them is a quarter of the construct rather than a third.
lparrived and the sentence counting them did not move.What this does not do
The
.inf-dropped-on-model_dumpround-trip is still the reason the curves come from four real models rather than from the fixture — untouched here, and the docstring's account of it stands. Fixing it would let the fixture carry a curve and retirePIECEWISEaltogether, which is a change to the model layer, not to a docs tool.What it means for the open PRs
#31's committed page is the prettier-padded shape, so once this guard is on
mainthat PR is red until its page is regenerated — which is the point of the guard, and a defect that was otherwise invisible. #31 and #33 both need rebasing onto the newmain; #31's one conflict is the generated page, resolved by running the tool, and #33 does not touch it.Checks
pixi.shis unreachable from this environment, so the gates ran on a 3.13 venv at the versionspixi.tomlpins, plusprettier@3.9.3andtyposfetched directly: 350 passed on this base (348 plus the two new guards),ruffcheck and format clean,pyrefly0 errors, prettier clean,typosclean,reuse lintcompliant.Two things worth naming rather than implying:
prettier --check --ignore-path /dev/null docs/reference/notation.mdreports the page as needing reformatting, and with the entry it is left alone.tools/render_tex.pyglobsexamples/**/*.yaml, so the LaTeX gate now covers nineteen models rather than fifteen. The render half runs clean here; the compile half needstectonic, which this environment has no way to run — CI is the first place that executes it. The four models come from a repository running the same two-package gate, so they compiled there.