Part of Stage 1 — behavior-preserving construction (see the Stage-1 tracking issue). Stage 0: jepegit/cellpy#439. Plan documents live in the shared workspace: cellpy-workspace/architecture-plan/ (the architecture-plan repo; formerly architecture-plan/) (alongside the cellpy and cellpy-core repos). Everything in Stage 1 lands on master with the full suite green; nothing flips user-visible behavior.
Goal
cellpycore/legacy/meta_mapping.py declaring the legacy CellpyMetaCommon /
CellpyMetaIndividualTest ⇄ core CellMeta / TestMeta translation once:
COMMON_TO_CELL_PAIRS, COMMON_TO_TEST_PAIRS (the re-homed cell_name,
start_datetime, time_zone, tester_ID→tester_id), INDIVIDUAL_TO_TEST_PAIRS
(incl. test_ID→test_id int coercion), LEGACY_ONLY (each with documented
destination), CORE_ONLY (migration fills from context) — with the same
bijectivity/round-trip/totality tests as the header mapping. Resolve in the same PR:
the G9 decision (tester software/calibration fields → recommendation: into TestMeta)
and CellMeta.volume (needed by volumetric units mode).
Why
Metadata plan Step 1 — small, pure, and it unblocks the legacy-import shim, the loader
draft contract, and journal-page generation. The pattern is proven
(tests/test_header_mapping.py); reusing it means a field added on either side fails
the build until deliberately categorized.
Links (workspace)
Acceptance
- Totality tests in place; G9 + volume decisions recorded in the metadata plan doc
(dated note) and implemented.
Goal
cellpycore/legacy/meta_mapping.pydeclaring the legacyCellpyMetaCommon/CellpyMetaIndividualTest⇄ coreCellMeta/TestMetatranslation once:COMMON_TO_CELL_PAIRS,COMMON_TO_TEST_PAIRS(the re-homedcell_name,start_datetime,time_zone,tester_ID→tester_id),INDIVIDUAL_TO_TEST_PAIRS(incl.
test_ID→test_idint coercion),LEGACY_ONLY(each with documenteddestination),
CORE_ONLY(migration fills from context) — with the samebijectivity/round-trip/totality tests as the header mapping. Resolve in the same PR:
the G9 decision (tester software/calibration fields → recommendation: into
TestMeta)and
CellMeta.volume(needed by volumetric units mode).Why
Metadata plan Step 1 — small, pure, and it unblocks the legacy-import shim, the loader
draft contract, and journal-page generation. The pattern is proven
(
tests/test_header_mapping.py); reusing it means a field added on either side failsthe build until deliberately categorized.
Links (workspace)
architecture-plan/cellpy2-metadata-handling-plan.md(Step 1, open questions 1/6)architecture-plan/legacy-cellpy-core-header-swapping.md(the pattern)Acceptance
(dated note) and implemented.