Repository navigation
Conversation
`given:` now follows `description:` on `Spec`, so `to_yaml()`, the canonical form and what `merge` and `override` return all write it before `dimensions:`. The key table in the language reference lists it first too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019i7xNVeQzGJykmE9id6w51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019i7xNVeQzGJykmE9id6w51
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011a8N2JQdmmd1WhVCKN1a2A
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CsaSWMofYqJiKmnSiPycV9
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011a8N2JQdmmd1WhVCKN1a2A
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011a8N2JQdmmd1WhVCKN1a2A
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011a8N2JQdmmd1WhVCKN1a2A
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXkcLcoxVyLvgDfZgt2eUt
…straints, and macros before expressions The field order on Spec is the section order of to_dict, to_yaml and the canonical form. The order is now: given, dimensions, relations, parameters, variables, constraints, sos, piecewise, objective, macros, expressions, masks, assumptions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXkcLcoxVyLvgDfZgt2eUt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXkcLcoxVyLvgDfZgt2eUt
Documentation build overview
53 files changed ·
|
…nstraints The sections now follow the typeset document: the objective comes before the rows it is subject to. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXkcLcoxVyLvgDfZgt2eUt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXkcLcoxVyLvgDfZgt2eUt
…the file The legend lists Given first. Variable domains prints directly after Subject to, before Definitions and Masks. A special ordered set prints under Subject to, between the constraints and the curves. Assumptions stays last. The declared gallery pages print the domains after the constraints too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXkcLcoxVyLvgDfZgt2eUt
This branch has not been deployed
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.
Breaking. The file and the typeset document now use one section order. Canonical files that have
objective,sos,piecewiseormacroschange.givendimensions,relations,parametersvariablesobjective,constraints,sos,piecewisemacros,expressions,masksassumptionsEach part of the document keeps the file's order. The one exception is Variable domains: it reads
variablesbut prints after the rows.Method, gate output, alternatives
File.
src/mathspec/spec.py: the fields onSpecmove.objectivegoes beforeconstraints.sosandpiecewisego directly afterconstraints.macrosgoes directly beforeexpressions.tests/test_canonical.py:SECTIONSpins the new order. Withspec.pyas onmain,test_the_sections_come_in_one_orderfails for 27 example specs (27 failed, 26 passed). With the move, 53 pass.docs/reference/language/file.mdanddocs/reference/reading.md: the key table and the order list follow.reading.mddid not listmasksbefore; it does now.Typeset document.
typesetting/legend.py: Given moves from after Variables to the top of the legend.typesetting/walk.py: Variable domains moves from after Masks to directly after Subject to. Asos:set moves from under its variable in Variable domains to Subject to, between the constraints and the curves.tools/gallery.py: a declared page (docs/examples/pypsa.md) prints the domains after the constraints, before the named expressions.tools/notation.py: the caption of the SOS section says where a set prints now.docs/reference/typeset.md: one bullet states the order of the legend and the equations.docs/several-files.md: the two hand-kept outputs move Variable domains before Definitions.tests/test_several_files_page.pyruns the steps and holds the page to what they print.tests/typesetting/test_cases.py:test_the_definitions_print_in_declaration_orderread the Definitions section up to Variable domains. Definitions is now the last section in that fixture, so it reads to the end.notation.md,see-an-expansion.md,composed.md. Withwalk.pyandlegend.pyas onmain, 36 tests intests/typesetting,tests/test_docs.pyandtests/test_several_files_page.pyfail. With the change, they pass.Gates.
pixi run lint: clean.pixi run test: 2841 passed, 1 skipped. I did not rundocs-buildorcompile-tex. CI runs both.Choices.
given: parametersis data the user gives, but it still prints under Given and not under Parameters.Alternatives not taken.
macros,masksandexpressionsbeforeconstraints). Names are one namespace resolved at load, and the document prints definitions after their uses.assumptionsdirectly afterparameters, with the rest of the data contract. It is a check on the data, not data, so it stays last.Not done. The YAML files in
docs/andexamples/keep their written order. The loader accepts any order, and no gate checks the examples for canonical form.🤖 Generated with Claude Code
https://claude.ai/code/session_01LXkcLcoxVyLvgDfZgt2eUt