docs: what spec.expand() returns is documented on the model writer's python api page, and reading.md keeps only which program an engine reads - #696
Merged
FBumann merged 1 commit intoSep 25, 2026
Conversation
…python api page, and reading.md keeps only which program an engine reads The Spec.expand docstring, which the Python API page in Reference renders, is now the one home for the call: the kinds and their order, the ValueError, a different model that takes the same data, itself where there is nothing to write out, and no caching. It no longer says "the same math". reading.md's section says which program an engine reads. Five links point at the API entry. The three claims reading.md checked move to tests/test_expand.py, and the page's claim count drops from 22 to 19. Schema regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
FBumann
added this pull request to stack #684
September 25, 2026 06:48
This was referenced Sep 25, 2026
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.
Note
The following content was generated by AI.
A later prompt set the scope: "Dont fold it into the big PR. Put it into the stack!" This change was first a commit on #686, which now reverts it.
What this changes
The
Spec.expanddocstring, which the Python API page in Reference renders, is now the one home for the call.reading.md, under Development, keeps only which expanded program an engine reads. The docstring no longer says "the same math".Method, gate output, alternatives
src/math_spec/model.py:Spec.expanddocstring gives the kinds and the order they apply in, theValueError, and that the result is a different model taking the same data. It also says the call returns itself where there is nothing to write out, and that nothing is cached.Specclass docstring says "the model with its formulations written out as plain rows", not "the same math".schema/math-spec.schema.jsonis regenerated from these docstrings.docs/reference/reading.md: "Formulations written out" says which program an engine reads, and that an expansion's program holds no curve.api.md#math_spec.Spec.expand: typeset, piecewise, see-an-expansion, file-and-program, what-counts-as-public-api.reading.mdchecked three claims, and they are now tests intests/test_expand.py. The claims: the expansion is not equal to its source, expanding it again returns it, and a model with nothing to write out returns itself. The page's pinned claim count intests/test_reading_page.pydrops from 22 to 19.pytest -q:1632 passed, 7 skipped.ruff check .,ruff format --check .: clean.mkdocs build --strict, with the blockeddocs.python.orginventory removed: built, no warnings.pixi run ci,compile-tex.ffcd68e).Why
expand()is model-writer API, and its only description sat on a page for engine authors.🤖 Generated with Claude Code
https://claude.ai/code/session_01A89tReSh8rTBG9ocy7688y
Generated by Claude Code