Repository navigation
docs: every spec in the docs and examples opens with its given block - #813
Merged
Merged
Conversation
Each spec that reads another file's names now puts its `given:` block first, after its `description:`. The PyPSA splitter writes its fragments in that order, and the gallery pages are regenerated. 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 ·
|
Contributor
Author
|
@FabianHofmann I think the given blocks should be the first ones in a spec, so its obvious right away that its a fragment. |
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_011a8N2JQdmmd1WhVCKN1a2A
…jan-mfocq7 # Conflicts: # CHANGELOG.md
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.
Every spec in
examples/and in the hand-written docs that has agiven:block now puts it first, afterdescription:. The PyPSA splitter writes its fragments in this order.What this changes
Method, gate output, alternatives
examples/**/*.yamland theyamlsnippets indocs/several-files.md,docs/howto/compose.mdanddocs/reference/language/declarations.md: the top-levelgiven:block moved to directly afterversion:anddescription:, with no other change. Each diff is the block, cut and pasted. The sorted lines of every changedyamlandmdfile equal those oforigin/main.tools/pypsa_split.py:_fragmentwritesgiven:before the first section, not aftervariables:.examples/pypsa/*.yamlis regenerated withpython -m tools.pypsa_split split examples/pypsa.docs/examples/**, README,docs/index.md, notation, operators, expansion) and the typesetter golden files are regenerated.CHANGELOG.md: this PR's line.Re-run after a merge of
main. For a conflicted example or page, take main's version, save the script below asmove_given.py, then:The script is idempotent. It moves text, so comments and formatting stay.
move_given.py
Placement.
given:followsdescription:(andversion:), and comes beforedimensions:. The reason is thatdescription:is what a typeset document prints first. If "start with" means the very first key, the move is the same script with one line changed.Gates. Merged with
origin/mainat eefa8d2 (#837, after #810).pixi run lint: clean.pixi run ci: green, 54 documents compiled. Generated files regenerated; the diff against main is the given-first order only.Not done. Inline specs in
tests/*.pyare not reordered. The key table indocs/reference/language/file.mdstill listsgivenfifth. No loader or lint rule enforces the order.Why
The ask above.
🤖 Generated with Claude Code
https://claude.ai/code/session_019i7xNVeQzGJykmE9id6w51
Generated by Claude Code