Skip to content

Stage 0.2: Cellpy-file HDF5 characterization tests#443

Merged
jepegit merged 1 commit into
masterfrom
429-cellpy-file-characterization-tests
Jul 9, 2026
Merged

Stage 0.2: Cellpy-file HDF5 characterization tests#443
jepegit merged 1 commit into
masterfrom
429-cellpy-file-characterization-tests

Conversation

@jepegit

@jepegit jepegit commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add tests/test_cellpy_file_roundtrip.py — Stage 0.2 characterization suite locking current cellpy-file (HDF5) load/save behavior before the module extraction refactor.
  • Commit fid-populated v8 oracle testdata/hdf5/20160805_test001_45_cc_v8_with_fids.h5 and compare helpers in tests/cellpy_file_support.py.
  • Three tests marked @pytest.mark.essential: v8 round-trip (full frame equality), limits-prefix trap (unprefixed limits in /CellpyData/info), and selector={"max_cycle": N} truncation.
  • Full suite also pins legacy v6/v7 loads, v4/v5 TypeError (current behavior), v0 WrongFileVersion, missing HDF key exception, and check_file_ids smoke.

Closes #429

Test plan

  • uv run pytest tests/test_cellpy_file_roundtrip.py -v (10 passed)
  • uv run pytest -m essential --ignore=tests/test_plotutils_summary_plot.py (21 passed)
  • CI essential (linux / uv) green on PR

Notes

  • v4/v5 fixtures currently fail with TypeError on _extract_meta_from_old_cellpy_file_max_v7 (missing upgrade_from_to) — tests pin that behavior for the refactor to fix deliberately.
  • graphify-out/ local rebuild left unstaged (not part of this PR).

Made with Cursor

Lock load/save behavior before the cellpy-file refactor: v8 round-trip with
a fid-populated fixture, limits-prefix trap, max_cycle selector, legacy version
matrix, and missing-key failure mode. Three essential tests extend the PR gate.

Closes #429.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 9, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@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: Cursor Bugbot was not present on this PR (signal skipped per policy), and no applicable approval policies or automated findings require human review. No reviewers were assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@jepegit jepegit merged commit 502a11c into master Jul 9, 2026
2 checks passed
@jepegit jepegit deleted the 429-cellpy-file-characterization-tests branch July 9, 2026 15:52
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 0.2: Characterization tests — cellpy-file round-trip + legacy version matrix

1 participant