Skip to content

Stage 1: behavior-preserving construction for cellpy 2 (tracking issue) #459

Description

@jepegit

Goal

Complete Stage 1 — behavior-preserving construction: every refactor and parallel
build that can land on master with the full v1.x suite green, so that the Stage-2 flip
(native headers + polars, one flag-day) becomes a small, well-oracled step instead of a
rewrite. Nothing in Stage 1 changes user-visible behavior; everything is guarded by the
Stage-0 characterization suites and oracles (#439).

Why

The plans in cellpy-workspace/architecture-plan/ (the architecture-plan repo; formerly architecture-plan/) are all shaped around the same move:
build the new thing next to the old thing, prove parity, then swap. Stage 1 is the
"build next to" phase across five workstreams: cellpy-file I/O, configuration, units,
header translation, and de-indexing — plus the additive cellpy-core modules
(units helpers, mapping extensions, meta mapping, curves) they consume.

Issues by workstream

cellpy-file I/O (architecture-plan/cellpy-file-loading-refactor-plan.md)

Units (architecture-plan/unit-handling-cellpy2-plan.md)

Configuration (architecture-plan/cellpy2-configuration-and-parameters-plan.md)

Headers (architecture-plan/cellpy2-native-headers-migration-plan.md)

Polars preparation (architecture-plan/cellpy2-polars-port-execution-plan.md)

Conventions

cellpy-core additive modules

Sequencing constraints (the ones that bite)

  1. Stage 1.5: Units Phase 1 — one CellpyUnits, one pint registry, rename the core alias #450 before Stage 1.2: File-loading — stateless helpers out, selector/limits side-channel dead #447/Stage 1.3: File-loading — move the read and write paths into cellpy_file/ #448 — the core-alias rename must not interleave with the
    cellreader code moves (agreed in both plans' risk tables).
  2. Core-first merge order for additions: Update pyyaml to 3.13 #115 → release + re-pin → Stage 1.6: Units Phase 2 — delegate the duplicated converters to cellpycore.units #451;
    Update pytest to 3.7.1 #116 → release + re-pin → Stage 1.15: translate.py — dormant native⇄legacy frame translation in cellpy_file/ #458 (release plan §3).
  3. Stage 1.11: Conventions machinery — deprecation helper, exception tree (implementation) #456 before Stage 1.4: File-loading — out-of-band redirects, typed errors, cellpy convert CLI #449 and Stage 1.8: Config — swap the engine under prms, migrate call sites, kill import-time init #453 (they import the conventions machinery).
  4. Stage 0.9: Benchmark harness + v1.x performance baselines #436 baselines before Stage 1.12: Polars Phase A — de-index raw/summary/journal in place #457 (de-indexing is where perf could silently move).
  5. Stage 1.1: Purge non-config constants from prms.py; create readers/cellpy_file/ with format.py #446 is the shared step of two plans — whoever lands it, the other rebases.
  6. Stage 1.10: Fix hard-coded column-header literals (report priorities 1–3) #455 and Stage 1.7: Config — build the pydantic-settings stack in parallel #452 are independent and can start immediately.

Exit criteria (Stage 1 done ⇒ Stage 2 flip may be scheduled)

Metadata

Metadata

Assignees

No one assigned

    Labels

    cellpy2-stage1cellpy 2 Stage 1: behavior-preserving construction

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions