Skip to content

Stage 0.3: Characterization tests — configuration system (prms) #430

Description

@jepegit

Part of Stage 0 — foundations for cellpy 2 (see the tracking issue). 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).

Goal

Pin the current prms behavior before the pydantic-settings rework:

  • config-file round-trip (extend test_prms.py),
  • precedence: file values vs runtime mutation,
  • OtherPath coercion in Paths (+ resolve behavior),
  • .env_cellpy secret pickup as consumed by internals/otherpath.py,
  • cellpy setup file/folder creation,
  • an inventory test asserting the exact set of (section, field, default) triples.

Why

Config plan Step 0. The inventory test becomes the parity contract for the new pydantic
models (plan Step 2 asserts new defaults == old, field by field). Validation will later
find type lies (e.g. Reader.limit_loaded_cycles declared Optional[int] but used as a
[from, to] list in arbin_res.py) — current behavior must be recorded before it is fixed.

Links

  • architecture-plan/cellpy2-configuration-and-parameters-plan.md (Step 0, §6 risks)
  • architecture-plan/cellpy2-plans-gap-analysis.md (G7 — OtherPath decision recorded in config plan §5b)

Acceptance

  • Inventory test fails if any prms field/default changes without the test being updated.
  • All listed behaviors covered; suite green on master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cellpy2-stage0cellpy 2 Stage 0: foundations (characterization, baselines, test framework)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions