Repository navigation
Add logical Record metadata snapshot - #767
Conversation
93f309a to
5d6a3dc
Compare
|
I removed |
|
I also addressed the three nonblocking cases from the re-review in 5531bb8. Invalid |
## Summary Prepare WFDB-Python 5.8.0 after the merged, additive metadata work in #767 and #770. This bumps the version to 5.8.0 and collects the two changelog fragments. #769 also clarified the existing multi-segment read contract. The legacy `rdrecord`, `rdheader`, and writer behavior remains unchanged. - `Record.metadata` provides an immutable snapshot of the current logical view and reports every loaded signal form. - `read_multi_segment_headers` reads the main multi-segment header plus the layout header (or first non-gap data segment header for fixed layout), without loading samples or all segment headers. ## Checks - `uv build` produced the 5.8.0 source distribution and wheel. - Sphinx HTML build passed with warnings treated as errors. - `git diff --check` passed. - The feature PRs passed CI before merging; this release PR will run CI again.
Summary
Add
Record.metadataas an immutable snapshot of the current logicalRecordview. This is the next small step toward #743 and #371 after the source-header API in #763.The snapshot reports the record's frame and channel counts, sampling frequency, base date and time, comments, per-channel names, units, and calibration when defined.
loaded_formslists every signal array currently present, including both physical and digital forms after conversion. File names, formats, skew, and other source layout fields stay in the separate source-header model.Existing mutable
Recordattributes remain authoritative. Accessingmetadatabuilds a new frozen object each time, so an in-place edit appears in the next snapshot without maintaining a second mutable copy. Counts come fromsig_lenandn_sig, so callers who manually resize an array must update those attributes too. If channel attribute lists have inconsistent lengths during an edit,signalsisNonewhile the other metadata remains available. The property is limited toRecord;MultiRecordneeds a separate decision about logical channel metadata and segment layout (#746).This is based on the released 5.7.0
mainbranch. It does not change the legacy read or write APIs.Checks