Skip to content

Stage 1.3: move cellpy-file read/write paths into cellpy_file/ (#448)#483

Merged
jepegit merged 2 commits into
masterfrom
cursor/file-loading-read-write-c2bd
Jul 13, 2026
Merged

Stage 1.3: move cellpy-file read/write paths into cellpy_file/ (#448)#483
jepegit merged 2 commits into
masterfrom
cursor/file-loading-read-write-c2bd

Conversation

@jepegit

@jepegit jepegit commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

Implements Stage 1.3 (file-plan Steps 4 + 5): extracts the cellpy-file HDF5 read and write paths from CellpyCell into dedicated modules under cellpy/readers/cellpy_file/.

  • read.py — version gate, v8 reader, shared extractors, public load()LoadResult
  • legacy_read.py — v3–v7 readers + old-meta unit-label conversion
  • write.pycreate_infotable() + save() with a single with HDFStore lifecycle (fixes open-store-across-functions)
  • selectors.py — adds LoadResult
  • CellpyCell.load() / save() — thin wrappers; save policy checks unchanged

Depends on #447 (helpers + LoadSelector/LoadLimits).

Test plan

  • uv run pytest tests/test_cellpy_file_roundtrip.py (10 passed)
  • uv run pytest -m essential (82 passed)

Closes #448

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 13, 2026 13:17
…448)

Move HDF5 version gate, v8 reader, legacy v3-v7 readers, and shared
extractors out of CellpyCell into cellpy_file/read.py and legacy_read.py.
Introduce LoadResult; CellpyCell.load() becomes a thin wrapper.
Stage 1.3 commit 1 of 2 — behavior preserved per roundtrip oracles.

Co-authored-by: jepe <jepe@ife.no>
Move infotable building and HDF5 persistence into cellpy_file/write.py
with a single owned store lifecycle. CellpyCell.save() keeps policy
checks and delegates I/O. Lazy __init__ exports avoid prms import cycle.
Stage 1.3 commit 2 of 2.

Co-authored-by: jepe <jepe@ife.no>
@jepegit
jepegit marked this pull request as ready for review July 13, 2026 16:28
@jepegit
jepegit merged commit e551712 into master Jul 13, 2026
5 of 6 checks passed
@jepegit
jepegit deleted the cursor/file-loading-read-write-c2bd branch July 13, 2026 16:29

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: essential and benchmark CI checks passed. Cursor Bugbot was not configured on this PR, so that signal was skipped. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stage 1.3: File-loading — move the read and write paths into cellpy_file/

2 participants