Skip to content

feat(frames): Polars Phase A — de-index raw/summary/journal + warn-only lint (Stage 1.12, #457)#499

Merged
jepegit merged 1 commit into
masterfrom
457-deindex-phase-a
Jul 15, 2026
Merged

feat(frames): Polars Phase A — de-index raw/summary/journal + warn-only lint (Stage 1.12, #457)#499
jepegit merged 1 commit into
masterfrom
457-deindex-phase-a

Conversation

@jepegit

@jepegit jepegit commented Jul 15, 2026

Copy link
Copy Markdown
Owner

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:

  • A1 raw: arbin_res stops promoting data_point to the index. The frozen v8 storage keeps its stored index (write-side promotion and the HDF5 where-clauses are storage-boundary concerns inside cellpy_file/); the read path de-indexes right after select, so in-memory raw always carries a RangeIndex + the data_point column.
  • 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 (their stored index was created with drop=True).
  • A3 journal: the four pages.set_index(filename) sites gain drop=False — the key now also lives in a column; removing the index itself rides utils wave 1 as planned.
  • Warn-only index lint: tests/test_index_lint.py counts 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_index made column-aware (still keyed by cycle numbers), and the pipeline_smoke goldens regenerated via dev/regenerate_goldens.py (the summary legitimately gains the cycle_index column).

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

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>
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

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.

@cursor
cursor Bot requested a review from amundmr July 15, 2026 07:15

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not approve: Cursor Bugbot is not enabled and did not review this PR, so there is no automated review signal. Human review is needed for the de-indexing changes across readers and utils; reviewers have been assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor
cursor Bot requested a review from msudars July 15, 2026 07:15
@jepegit
jepegit merged commit e4aec48 into master Jul 15, 2026
4 checks passed
@jepegit
jepegit deleted the 457-deindex-phase-a branch July 15, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stage 1.12: Polars Phase A — de-index raw/summary/journal in place

1 participant