-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use cached namespaces during validation #531
base: dev
Are you sure you want to change the base?
Conversation
@@ -126,7 +126,9 @@ def inspect_all( | |||
if progress_bar_options is None: | |||
progress_bar_options = dict(position=0, leave=False) | |||
|
|||
if in_path.is_dir(): | |||
if in_path.is_dir() and (in_path.match("*.nwb*")) and (in_path / ".zgroup").exists(): |
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.
I'm not sure if (in_path / ".zgroup").exists()
is the appropriate check here for a Zarr NWB file or if it is even necessary
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.
@rly you mentioned you had a related test file, can you let me know if this solves the issue or share the file? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #531 +/- ##
==========================================
+ Coverage 82.77% 86.71% +3.94%
==========================================
Files 47 47
Lines 1504 1506 +2
==========================================
+ Hits 1245 1306 +61
+ Misses 259 200 -59
|
Motivation
Fix #528.
Recent Zarr-related updates switched the inspector from using
pynwb.validate(paths=paths)
topynwb.validate(io=io)
, resulting in the inspector not using cached namespaces during validation. We will temporarily revert this change, since pynwb validation of Zarr NWB files is not yet fully supported anyway due to pending issues that need to be addressed in hdmf/pynwb.Since this is more of a bug on the pynwb side that using the
io
argument ignores theuse_cached_namespaces=True
setting in the validator (and will be updated in the next major pynwb release), I'm not sure if there are really any specific tests to add here.While addressing this issue, I added a couple of other small updates to the Zarr support here:
inspect_all
that detected whether the path provided was a directory of NWB files or an NWB file.test_inspect_all_parallel
tests had been indented and were not running