pynwb
pynwb copied to clipboard
Enh/getcachednamespaces
Motivation
#1431
Relate to https://github.com/dandi/dandi-cli/issues/917
This PR extracts the code to determine the cached extension namespace to use for validation from the main function of the command line validator to a separate function so that the code can be used outside to validate files against cached namespaces.
Checklist
- [x] Did you update CHANGELOG.md with your changes?
- [X] Have you checked our Contributing document?
- [X] Have you ensured the PR clearly describes the problem and the solution?
- [X] Is your contribution compliant with our coding style? This can be checked running
flake8
from the source directory. - [X] Have you checked to ensure that there aren't other open Pull Requests for the same change?
- [X] Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.
@rly this issue would be good to address in the next minor release
Codecov Report
Merging #1432 (f5ab53d) into dev (4460a1b) will decrease coverage by
0.08%
. The diff coverage is0.00%
.
@@ Coverage Diff @@
## dev #1432 +/- ##
==========================================
- Coverage 78.42% 78.34% -0.09%
==========================================
Files 37 37
Lines 2777 2780 +3
Branches 493 493
==========================================
Hits 2178 2178
- Misses 518 521 +3
Partials 81 81
Impacted Files | Coverage Δ | |
---|---|---|
src/pynwb/validate.py | 0.00% <0.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 4460a1b...f5ab53d. Read the comment docs.
@oruebel what do you think about also extracting most of the code in __main__
in src/pynwb/validate.py
to a function that takes as inputs the arguments passed into the CLI function. Then a user can basically call the CLI script using Python without using the shell.
what do you think about also extracting most of the code in
__main__
insrc/pynwb/validate.py
to a function
that makes sense
We agreed to incorporate this feature into validate
would this PR be merged/released some time soon?
@yarikoptic I'm close to finishing something very similar that also integrates with the dandi.pynwb_utils.validate
, look for that in next day or so
Pointed out some minor coding improvements.
Thanks, @jwodder !
this one is open since July -- any plans to finalize/release it ?
this one is open since July -- any plans to finalize/release it ?
@yarikoptic thanks for following up. I think this one got put on hold while #1494 was being worked out and I think that PR may potentially already address that issue. I'll bring it up during our developer meeting tomorrow to see whether this PR should be merged or whether it should be closed in favor of #1494
@yarikoptic This has indeed already been merged in https://github.com/NeurodataWithoutBorders/pynwb/pull/1511, this can be closed here and I'll get a PR up on the dandi-cli to adjust the API calls to have this functionality
Closing this PR since this has been addressed in https://github.com/NeurodataWithoutBorders/pynwb/pull/1511