Repository navigation
feat(spec)!: a spec written back out puts its given block first - #818
Merged
Merged
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
Documentation build overview
62 files changed ·
|
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
Contributor
Author
|
@FabianHofmann This is up to discussion. |
Contributor
Author
|
@FabianHofmann We need to check whether we want to rearrange other keys as well. Lets experiment individually with a stacked PR |
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.
to_yaml(), the canonical form, and the result ofmergeandoverridenow writegiven:directly afterdescription:. This matches the files in #813. A file with agiven:block thatcanonical --checkpassed before fails until it is rewritten with--write.Method, gate output, alternatives
src/mathspec/spec.py: thegivenfield onSpecmoves from aftervariablesto afterdescription. The section order ofto_dict()follows the field order, so this one move changes every writer.tests/test_canonical.py:SECTIONSpins the field order, andgivennow comes afterdescriptionin it. Before the field moved,test_the_sections_come_in_one_orderfailed for the 27 example specs that have agiven:block (27 failed, 27 passed). After the move, it passes.docs/reference/language/file.md: the key table listsgivenfirst.docs/reference/reading.md: "The sections come in one order" listsgivenafterdescription. It did not listgivenbefore.schema/mathspec.schema.json: regenerated withpython -m tools.schema, and nothing changed. The gallery pages and the typesetter golden files also did not change.!: a file kept in canonical form is no longer canonical once it has agiven:block.Gates. Merged with
origin/mainat eefa8d2 (#837, after #810).pixi run lint: clean.pixi run ci: green, 54 documents compiled. Generated files regenerated.Seen, not fixed.
docs/reference/reading.md, "The sections come in one order", omitsmasks. It did before this PR.Not done. The loader still accepts
given:anywhere in a file. Only the output order changes.Relation to #813. This PR is independent of #813. #813 reorders the files in
docs/andexamples/; this PR reorders what the package writes. Both add a line at the same place inCHANGELOG.md; the second to merge keeps both lines. A trial merge of both onorigin/mainat eefa8d2 ranpixi run cigreen: 2839 passed, 1 skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_019i7xNVeQzGJykmE9id6w51
https://claude.ai/code/session_01CsaSWMofYqJiKmnSiPycV9