-
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
Enh/detect nwb1 #1086
base: dev
Are you sure you want to change the base?
Enh/detect nwb1 #1086
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #1086 +/- ##
==========================================
- Coverage 67.39% 67.29% -0.11%
==========================================
Files 38 38
Lines 2288 2296 +8
Branches 393 394 +1
==========================================
+ Hits 1542 1545 +3
- Misses 677 682 +5
Partials 69 69
Continue to review full report at Codecov.
|
fyi @yarikoptic |
THANK YOU! It should help to save some gray hairs of yours truly! |
try: | ||
return super(NWBHDF5IO, self).read(**kwargs) | ||
except ValueError as e: | ||
built = next(iter(self._HDF5IO__built.values())) |
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.
@ajtritt and I suggest checking for neurodata_type
. If it does not exist, then the file is not 2.0+.
To report the NWB 1.x version, it would be better to open the h5py.File and look for the root-level dataset 'nwb_version' (around 1.0.4) or the root-level dataset 'neurodata_version' (1.0.0).
Note sure what has stopped this PR from being finalized. Seems remains useful to have. Can it happen soon or should it be re-draft-ed/closed? |
Motivation
fix #1077
What do we want as an error message here? Something along those lines. Maybe we could point the user to the legacy library, but that didn't work for me either with this file. Also, these changes use the
io._HDF5IO__built
which has a leading underscore. Is there a better way to access these variables?How to test the behavior?
Use this NWB 1 file:
Checklist
flake8
from the source directory.#XXX
notation whereXXX
is the issue number?