-
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
Generalize Validation #1511
Generalize Validation #1511
Conversation
Ah, looks like you are still working on this. Happy to help or review it when ready. |
@rly @oruebel This is ready to be looked at... Main issue I'm having right now is getting the non-required argument parsing through docval to work. Traceback (most recent call last):
File "C:\Users\Raven\.conda\envs\pynwb\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Raven\.conda\envs\pynwb\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "d:\github\pynwb\src\pynwb\validate.py", line 223, in <module>
validate_cli()
File "d:\github\pynwb\src\pynwb\validate.py", line 213, in validate_cli
validation_errors, validation_status = validate(
File "C:\Users\Raven\.conda\envs\pynwb\lib\site-packages\hdmf\utils.py", line 648, in func_call
pargs = _check_args(args, kwargs)
File "C:\Users\Raven\.conda\envs\pynwb\lib\site-packages\hdmf\utils.py", line 637, in _check_args
raise ExceptionType(msg)
TypeError: validate: incorrect type for 'namespace' (got 'NoneType', expected 'str or NoneType') |
but likewise if I remove the Traceback (most recent call last):
File "C:\Users\Raven\.conda\envs\pynwb\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Raven\.conda\envs\pynwb\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "d:\github\pynwb\src\pynwb\validate.py", line 223, in <module>
validate_cli()
File "d:\github\pynwb\src\pynwb\validate.py", line 213, in validate_cli
validation_errors, validation_status = validate(
File "C:\Users\Raven\.conda\envs\pynwb\lib\site-packages\hdmf\utils.py", line 648, in func_call
pargs = _check_args(args, kwargs)
File "C:\Users\Raven\.conda\envs\pynwb\lib\site-packages\hdmf\utils.py", line 637, in _check_args
raise ExceptionType(msg)
TypeError: validate: incorrect type for 'namespace' (got 'NoneType', expected 'str') |
Never mind, I just had to set the CLI parser default value to resolve this. |
@rly @oruebel Now I'm trying to debug these failing validation CLI tests, but when I locally run the tests it gives .... Massive stack trace....
FileNotFoundError: [Errno 2] No such file or directory: 'coverage' How do I obtain this 'coverage' folder with what I presume contains NWB files I need to test against? |
Codecov Report
@@ Coverage Diff @@
## dev #1511 +/- ##
==========================================
+ Coverage 90.65% 91.34% +0.68%
==========================================
Files 25 25
Lines 2494 2507 +13
Branches 466 471 +5
==========================================
+ Hits 2261 2290 +29
+ Misses 148 137 -11
+ Partials 85 80 -5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Coverage on the new |
Thanks @CodyCBakerPhD and @rly for all the work on this PR to clean up validation! |
fix #1431
replaces #1494 by branching from dev instead of the modularity improvement
Motivation
WIP synchronizing the behavior of the CLI
pynwb.validate
function with the library-imported one, namely for the purposes of validating against cached namespaces (but also just to have identical behavior between library and CLI use cases).How to test the behavior?
Need to...
Checklist
flake8
from the source directory.enh/getcachednamespaces