-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix #1148 : Add passthrough on non-DCI H5DataIO to support its use in pynwb TimeSeries. #1149
Fix #1148 : Add passthrough on non-DCI H5DataIO to support its use in pynwb TimeSeries. #1149
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1149 +/- ##
==========================================
+ Coverage 88.91% 88.92% +0.01%
==========================================
Files 45 45
Lines 9857 9866 +9
Branches 2802 2806 +4
==========================================
+ Hits 8764 8773 +9
Misses 776 776
Partials 317 317 ☔ View full report in Codecov by Sentry. |
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.
Hi @cboulay, sorry for the delayed review. I added a couple of small suggestions but otherwise looks great. Thanks again for the PR!
Sorry, this fell off the radar. I'll look at it this evening. |
@stephprince , thank you for the suggestions. I incporporated all your suggested changes. |
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.
Thanks for the updates! Looks good to me
Fix #1148
Motivation
What was the reasoning behind this change? Please explain the changes briefly.
As explained in #1148 and pynwb #1929, when a
pynwb.TimeSeries
object is created where (1) itsdata
is aH5DataIO
object that DOES NOT wrap a DataChunkIterator, AND (2) itstimestamps
are provided explicitly (vsrate
andstarting_time
), then theTimeSeries
object crashes because it cannot access themaxshape
attribute on itsdata
value.With this change, the
H5DataIO
has a newmaxshape
property which passes through the correct maxshape if known (either set during__init__
or inferred from the dataset) elseNone
, andpynwb.TimeSeries
no longer crashes.How to test the behavior?
I added a unit test in unit/test_io_hdf5_h5tools.py
Checklist
CHANGELOG.md
with your changes?