docs(v1): fix §11 MultiIndex-level projection example#856
Merged
Conversation
…raduation
The §11 example used `expr.indexes["snapshot"].get_level_values("period")`,
which cannot run under v1: v1 rejects a first-class `pd.MultiIndex` dimension
at construction, so `snapshot` is a flat dim with `period`/`timestep` as aux
coords and `.indexes["snapshot"]` is a flat index, not a MultiIndex. Replace it
with the working aux-coord mapping (verified on the branch) and add a one-line
note on the flat representation.
Also record in open-items.md that convention.md graduates into the rendered
Sphinx docs at the 1.0 reframe (add myst-parser, toctree, internal cross-refs);
until then it stays a design-record linked by URL — the rules are permanent but
the transitional framing would only be re-done, so rendering now is wasted.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
FBumann
force-pushed
the
docs/convention-s11-fix
branch
from
July 20, 2026 09:13
5afbb35 to
004ebcc
Compare
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.
Fixes a broken example in the v1 spec, found while polishing the migration guide (companion to #855). Part of the #717 spec-cleanup.
Note
The following was generated by AI.
§11 example can't run under v1. The MultiIndex-level projection fix read:
Verified on the branch: v1 rejects a first-class
pd.MultiIndexdimension at construction (add_variablesraisesValueError: ... does not support ... reset_index('snapshot')), sosnapshotis a flat dim withperiod/timestepas aux coords and.indexes["snapshot"]is a flat index —.get_level_values(...)fails. Replaced with the working aux-coord mapping (tested, coeffs[1,1,1,10,10,10]):The example now shows the full flow (map onto
snapshot, then multiply) rather than dangling an unused intermediate.Placement note. Also recorded in
open-items.mdthatconvention.mdgraduates into the rendered Sphinx docs at the 1.0 reframe (addmyst-parser, toctree, internal cross-refs). Until then it stays a design-record linked by URL: the §1–§13 rules are permanent, but the transitional "v1-vs-legacy" framing would only be re-done, so rendering now is wasted effort. This reflects the repo's own Stage-3 plan (goals.mdsplits permanent design goals from temporary transitioning goals).