Skip to content

Use on-demand channel views for record selection - #840

Merged
tompollard merged 1 commit into
mainfrom
feature/current-channel-view
Dec 2, 2026
Merged

tompollard merged 1 commit into
mainfrom
feature/current-channel-view

Conversation

@tompollard

Copy link
Copy Markdown
Member

Summary

This begins #744 without adding a second mutable metadata store. The channel snapshot introduced for writing is now a general on-demand view of aligned per-channel Record fields. It checks the length of each present field before building channel entries.

Both single-record selection and variable-layout MultiRecord selection now select complete channel entries, then project them back to the existing mutable Record lists. A later snapshot reflects in-place edits to those lists. No public attribute or file format changes are intended.

Verification

New tests cover in-place edits, a misaligned list, channels sharing one file with skew, expanded channels with different samples per frame, and a variable-layout header. The full offline suite passes (1,616 passed, 4 skipped, 23 deselected); Ruff and the strict Sphinx build pass.

Refs #744 and #749. Separating logical signal metadata from file encoding metadata remains follow-up work for #744.

@tompollard tompollard left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks. Results are unchanged: across every header in sample-data (1,352 reads covering all channels, [0], last-and-first and reversed selections, combined, expanded, preserved multi-segment and force_channels=False reads), every attribute's value and type matches the merge base, and the reads that fail there fail the same way here. Misaligned sig_name, skew and block_size lists still give the same write error from wrsamp and write_record, so the new length check in _capture_signal_fields acts as a backstop. Selecting 256 of 512 channels takes about the same time as before. The offline suite, Ruff and the strict docs build pass locally.

Ready to merge.

@tompollard
tompollard merged commit 9f36f52 into main Dec 2, 2026
19 checks passed
@tompollard
tompollard deleted the feature/current-channel-view branch December 2, 2026 02:21
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.

1 participant