Skip to content

Remove the headers_* legacy shim from CellpyCell (E3 final, #715) - #747

Merged
jepegit merged 1 commit into
masterfrom
715-remove-headers-shim
Jul 27, 2026
Merged

Remove the headers_* legacy shim from CellpyCell (E3 final, #715)#747
jepegit merged 1 commit into
masterfrom
715-remove-headers-shim

Conversation

@jepegit

@jepegit jepegit commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Final step of E3 (#715): remove the headers_* deprecation shim itself, now that the runtime was migrated off it in parts 1–3 (#744/#745/#746).

What

The per-instance CellpyCell.headers_normal / headers_summary / headers_step_table attributes were a 2.0 deprecation shim (LegacyHeaderShim) resolving legacy *_txt attribute access to native cellpycore column names. This removes the shim on both the native and legacy-bridge paths (the full-removal decision).

  • delete cellpy/parameters/legacy_header_shim.py (+ its test)
  • drop the shim wiring block from CellpyCell.__init__
  • drop the shim's pending-deprecation seed and regenerate DEPRECATIONS.md
  • migrate the remaining c.headers_* accesses to c.schema.raw / c.schema.steps / c.schema.summary across tests and the maccor/custom __main__ demo blocks
    • legacy-only step columns (info) become string literals
    • legacy-singleton (get_headers_normal()) usages keep their *_txt names
  • rewrite the two shim tests in test_cell_schema.py as a single shim-removed assertion

Replacement

c.schema.raw / c.schema.steps / c.schema.summary — native names on the native runtime, legacy names on the legacy bridge.

Verification

headers_normal attribute no longer exists on a cell; 227 tests across the affected suites (readers, roundtrip, schema, slim, bdf, plotutils, batmo, cv_partition, native_schema) pass locally with MPLBACKEND=Agg.

Closes #715

🤖 Generated with Claude Code

The per-instance `headers_normal` / `headers_summary` / `headers_step_table`
attributes were a 2.0 deprecation shim (LegacyHeaderShim) mapping legacy
`*_txt` attribute access to native cellpycore column names. The runtime was
migrated off the shim in 2.1 (parts 1-3, #744/#745/#746); this removes the
shim itself on both the native and legacy-bridge paths per the full-removal
decision.

- delete `cellpy/parameters/legacy_header_shim.py` (+ its test)
- drop the shim wiring block from `CellpyCell.__init__` (both branches)
- drop the shim's pending-deprecation seed; regenerate DEPRECATIONS.md
- migrate the remaining `c.headers_*` accesses to `c.schema.raw/steps/summary`
  across tests and the maccor/custom `__main__` demo blocks; legacy-only step
  columns (`info`) become literals, and legacy-singleton usages keep `*_txt`
- rewrite the shim tests in test_cell_schema.py as a shim-removed assertion

`c.schema.raw` / `c.schema.steps` / `c.schema.summary` is the replacement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 27, 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.

@jepegit
jepegit enabled auto-merge (squash) July 27, 2026 20:04
@jepegit
jepegit merged commit 06f9324 into master Jul 27, 2026
7 of 8 checks passed
@jepegit
jepegit deleted the 715-remove-headers-shim branch July 27, 2026 20:06
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.

E3: remove headers_* attribute access + make_new_cell

1 participant