-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid having to set rate=None
explitctly when passing timestamps in mock_ElectricalSeries
#1894
Avoid having to set rate=None
explitctly when passing timestamps in mock_ElectricalSeries
#1894
Conversation
mock_ElectricalSeries
rate=None
explitctly when passing timestamps in mock_ElectricalSeries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed review! Added a few small suggestions but otherwise looks good to me.
Co-authored-by: Steph Prince <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1894 +/- ##
==========================================
- Coverage 92.02% 83.93% -8.10%
==========================================
Files 27 27
Lines 2620 2620
Branches 685 685
==========================================
- Hits 2411 2199 -212
- Misses 139 328 +189
- Partials 70 93 +23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
The failing checks are due to a separate hdmf-zarr issue hdmf-dev/hdmf-zarr#192 and are unrelated to these changes to |
7a0d8b4
into
NeurodataWithoutBorders:dev
Motivation
Right now you get the following error when trying to pass timestamps to the
mock_ElectricalSeries
function.This is because we have
rate=30,000.0
as a default value in the function signature. To make this work, the user has to explictly set rate=None, that is:This is too cumbersome. This PR simplifies this so this is not necessary. To do this, it moves the logic of default values inside the function.
I also added some missing typing.
How to test the behavior?
The code above should work.
Checklist
flake8
from the source directory.