Allow zero values for numChans and SR in neuropixelsGLX reader#94
Merged
stevevanhooser merged 1 commit intomainfrom Apr 7, 2026
Merged
Conversation
…h mustBePositive The argument validators mustBePositive reject the sentinel default value of 0 used to indicate "read from .meta file". Changed to mustBeNonnegative so 0 is accepted as a valid default while still rejecting negative values. https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #94 +/- ##
=======================================
Coverage 30.73% 30.73%
=======================================
Files 92 92
Lines 4578 4578
=======================================
Hits 1407 1407
Misses 3171 3171 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updated input validation for the neuropixelsGLX reader to allow zero as a valid value for
numChansandSRparameters.Changes
numChansvalidation frommustBePositivetomustBeNonnegative, allowing 0 as a valid inputSRvalidation frommustBePositivetomustBeNonnegative, allowing 0 as a valid inputDetails
These parameters previously required strictly positive values (> 0), but the default value of 0 suggests that zero should be a valid input state. This change aligns the validation constraints with the intended default behavior, allowing users to pass 0 to indicate that these parameters should use default or auto-detected values.
https://claude.ai/code/session_01GQqT3LvvCKZ7tm7TCphrL1