Skip to content

Stage 1.16: metadata — legacy⇄core field-mapping module (meta_mapping) #117

Description

@jepegit

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cellpy2-stage1cellpy 2 Stage 1: behavior-preserving constructionyoloAllow the agents to run in YOLO-mode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions