Part of Stage 1 — behavior-preserving construction (see the Stage-1 tracking issue). Stage 0: #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
File plan Steps 4 + 5: read.py (version gate + v8 reader + extractors as module
functions over (store_or_path, format_spec, selector)), legacy_read.py (v3–v7
readers + update_headers rename wiring + old-meta unit-label conversion, registered in
the version-dispatch dict), write.py (_create_infotable + _convert2fid_table +
_save_to_hdf5 merged into one save(data, path, ...) whose store lifecycle is a single
with block). CellpyCell.load()/save() become the thin wrappers of plan §3.3; dead
privates deleted in the same PRs.
Why
This is the seam cellpy 2 plugs persistence into (core stubs load_archive/save_archive
expecting exactly this adapter), the future home of the header-translation step
(native-headers plan D2), and it fixes the open-store-handle-across-functions accident
(§2.3). The version-dispatch registry is what later makes v9 "one entry", not a 400-line
method.
Links
architecture-plan/cellpy-file-loading-refactor-plan.md (Steps 4–5, §3)
architecture-plan/cellpy2-native-headers-migration-plan.md (D2 — consumes this seam)
- Depends on: Stage 1.2. Check
tests/test_cellpy_method_integrity.py before deleting
privates (it may pin the method list).
Acceptance
Goal
File plan Steps 4 + 5:
read.py(version gate + v8 reader + extractors as modulefunctions over
(store_or_path, format_spec, selector)),legacy_read.py(v3–v7readers +
update_headersrename wiring + old-meta unit-label conversion, registered inthe version-dispatch dict),
write.py(_create_infotable+_convert2fid_table+_save_to_hdf5merged into onesave(data, path, ...)whose store lifecycle is a singlewithblock).CellpyCell.load()/save()become the thin wrappers of plan §3.3; deadprivates deleted in the same PRs.
Why
This is the seam cellpy 2 plugs persistence into (core stubs
load_archive/save_archiveexpecting exactly this adapter), the future home of the header-translation step
(native-headers plan D2), and it fixes the open-store-handle-across-functions accident
(§2.3). The version-dispatch registry is what later makes v9 "one entry", not a 400-line
method.
Links
architecture-plan/cellpy-file-loading-refactor-plan.md(Steps 4–5, §3)architecture-plan/cellpy2-native-headers-migration-plan.md(D2 — consumes this seam)tests/test_cellpy_method_integrity.pybefore deletingprivates (it may pin the method list).
Acceptance
HDFStorecrosses a function boundary (the writer owns itswith).