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 6 + 7:
batch_helpers.look_up_and_get() → cellpy_file.read_table(path, table, max_cycle=…)
(deletes the hard-coded "/CellpyData", the duplicated cycle filter, and its
unclosed-store edge); _check_cellpy_file() → cellpy_file.read_fid_table() (owns the
external-path temp copy).
- Typed exceptions:
CorruptCellpyFile(IOError) replaces the bare
Exception("OH MY GOD! ..."); narrow the blanket except AttributeError in load()
that turns any attribute bug into "file version not supported". Import the tree from
Stage 1.11's conventions module.
cellpy convert <old.h5> [<new.h5>] CLI: thin wrapper around
load(accept_old=True) + save() — the one-time upgrade path the legacy-freeze
decision requires (v<8 files stop being readable in cellpy 2).
Why
The out-of-band readers are the drift that bites during any format change; the error
handling currently swallows real corruption (file plan §2.5); and the convert CLI must
exist before 2.0 messaging tells users to run it.
Links
architecture-plan/cellpy-file-loading-refactor-plan.md (Steps 6–7, §7.2)
architecture-plan/cellpy2-conventions-plan.md (§1 exception tree)
architecture-plan/cellpy2-release-and-branching-plan.md (§1 support matrix)
- Depends on: Stage 1.3, Stage 1.11.
Acceptance
Goal
File plan Steps 6 + 7:
batch_helpers.look_up_and_get()→cellpy_file.read_table(path, table, max_cycle=…)(deletes the hard-coded
"/CellpyData", the duplicated cycle filter, and itsunclosed-store edge);
_check_cellpy_file()→cellpy_file.read_fid_table()(owns theexternal-path temp copy).
CorruptCellpyFile(IOError)replaces the bareException("OH MY GOD! ..."); narrow the blanketexcept AttributeErrorinload()that turns any attribute bug into "file version not supported". Import the tree from
Stage 1.11's conventions module.
cellpy convert <old.h5> [<new.h5>]CLI: thin wrapper aroundload(accept_old=True)+save()— the one-time upgrade path the legacy-freezedecision requires (v<8 files stop being readable in cellpy 2).
Why
The out-of-band readers are the drift that bites during any format change; the error
handling currently swallows real corruption (file plan §2.5); and the convert CLI must
exist before 2.0 messaging tells users to run it.
Links
architecture-plan/cellpy-file-loading-refactor-plan.md(Steps 6–7, §7.2)architecture-plan/cellpy2-conventions-plan.md(§1 exception tree)architecture-plan/cellpy2-release-and-branching-plan.md(§1 support matrix)Acceptance
load()regression — perf test).cellpy convertround-trips a v4 file to v8 on the testdata set.