Skip to content

v2 pre-flip: adopt cellpycore CurveCols as the canonical capacity-curve schema #540

Description

@jepegit

Context

Phase-3 flip prerequisite (native-headers plan Phase 0, item 3; hardcoded-column-headers-report §5): the get_cap output frame ("capacity", "voltage", "cycle", "direction") is an implicit contract hard-coded by the producer in capacity_curves.py and by ~125 consumer sites (easyplot, collectors, ica, plotutils). The report recommended defining canonical names once.

The decision is already made on the core side: cellpycore ships config.CurveCols (cycle_num, potential, capacity, direction) and OcvCurveCols (cycle_num, step_num, step_time, potential) with an authoritative spec (docs/specifications/curve-table.md, core #118). The legacy frame maps 1:1: voltagepotential, cyclecycle_num; capacity / direction are identical. cellpy should adopt, not invent.

Work

  1. Producer: cellpy.readers.capacity_curves builds its frames from CurveCols / OcvCurveCols attributes. Decide the compat surface for the v2 line pre-flip: keep emitting the legacy names by renaming at the boundary (mirroring the raw/steps/summary bridge pattern), or emit native names under the native_schema flag only.
  2. Consumers: migrate easyplot, collectors, ica, plotutils curve-frame sites onto the same objects (blocked on 1).
  3. Also cover the "q" / "v" (collect_capacity_curves) and "dq" (ica) names — map onto CurveCols or document as deliberate derived-frame names.

Not labeled for hands-off mode: step 1 contains the compat-surface decision.

Refs

Report §5/§8-4; core #118 / #126; cellpy #511 (native_schema flag as a possible gate).

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2cellpy v2.0 epic work - PRs should target the master branch

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions