Skip to content

Require an explicit signal layout - #775

Merged
tompollard merged 2 commits into
mainfrom
require-signal-layout
Nov 30, 2026
Merged

tompollard merged 2 commits into
mainfrom
require-signal-layout

Conversation

@tompollard

Copy link
Copy Markdown
Member

Summary

Require layout as a keyword argument to read_signal_values. Callers choose layout="uniform" to average multi-frequency channels to one value per base frame, or layout="expanded" to retain every channel sample. Omitting it now raises a TypeError before any file is read.

This is a small follow-up to #772 while the opt-in API is still unreleased. It addresses the default-layout concern in #745 and #376 without changing rdrecord, rdsamp, or the WFDB file reader.

The docs explain the choice, and all examples and tests now pass a layout. A regression test covers the omitted argument.

Verification

  • Offline suite: 1,032 passed, 4 skipped, 22 network tests deselected (MPLBACKEND=Agg).
  • Ruff check and format pass.
  • Sphinx HTML build passes with warnings treated as errors.

@tompollard

Copy link
Copy Markdown
Member Author

Agreed. I updated changelog.d/explicit-signal-values.rst to describe the required layout as part of the new reader's first release note, and removed the separate require-signal-layout.rst fragment in 23dbd18. The towncrier draft now has one entry for read_signal_values.

@tompollard
tompollard merged commit 3eb758d into main Nov 30, 2026
19 checks passed
@tompollard
tompollard deleted the require-signal-layout branch November 30, 2026 04:30
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