feat(frames): Polars Phase A — de-index raw/summary/journal + warn-only lint (Stage 1.12, #457)#499
Merged
Merged
Conversation
Keys live in columns, never in an index (polars plan decision 3), applied in place and v1.x-safe: - A1 raw: arbin_res stops promoting data_point to the index; the frozen v8 storage keeps its stored index (write-side promotion + HDF5 where-clauses are storage-boundary concerns) and the read path de-indexes right after select - A2 summary: cycle_index_as_index flipped off in both summary builders; split/with_cycles stop re-promoting; the read path restores cycle_index as a column when loading old files - A3 journal: pages.set_index(filename) sites gain drop=False so the key also lives in a column (index removal itself rides utils wave 1) - warn-only index lint (tests/test_index_lint.py) outside the sanctioned boundary modules; polars Phase D flips it to a hard ban - deliberate characterization updates (documented per test): index-name assertions inverted, golden lookups by column, journal missing-header count 1 -> 0, remove_outliers_from_summary_on_index made column-aware, pipeline_smoke goldens regenerated by script (summary gains the cycle_index column) Full suite: 585 passed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.


Closes #457 (Stage 1.12 / polars plan Phase A + D-preparation).
Keys live in columns, never in an index — dissolved in place while still on pandas, v1.x-safe:
arbin_resstops promotingdata_pointto the index. The frozen v8 storage keeps its stored index (write-side promotion and the HDF5 where-clauses are storage-boundary concerns insidecellpy_file/); the read path de-indexes right afterselect, so in-memory raw always carries a RangeIndex + thedata_pointcolumn.cycle_index_as_indexflipped off in both summary builders;split/with_cyclesstop re-promoting; the read path restorescycle_indexas a column when loading old files (their stored index was created withdrop=True).pages.set_index(filename)sites gaindrop=False— the key now also lives in a column; removing the index itself rides utils wave 1 as planned.tests/test_index_lint.pycounts index idioms outside the sanctioned boundary modules (readers/cellpy_file/,parameters/legacy/) and warns — never fails; polars plan Phase D flips it to a hard ban.Deliberate characterization updates (each documented in-test per the Stage-0 exit criteria): index-name assertions inverted, golden lookups moved from
.loc[cycle]to column filters, journal missing-header count 1 → 0 (filename no longer missing from columns — an improvement),remove_outliers_from_summary_on_indexmade column-aware (still keyed by cycle numbers), and the pipeline_smoke goldens regenerated viadev/regenerate_goldens.py(the summary legitimately gains thecycle_indexcolumn).Full suite: 585 passed, 0 failed. The tiered benchmark gate on this PR is the #457 acceptance check (de-indexing is where perf could silently move).
🤖 Generated with Claude Code