pynwb icon indicating copy to clipboard operation
pynwb copied to clipboard

validator should be able to output machine readable results

Open t-b opened this issue 4 years ago • 6 comments

Could be JSON using --json in a format like

{
    "exitcode" : 0,
    "issues" : [ { "description": "", "location":"", "severity": 10}, ]
}

t-b avatar Feb 06 '20 21:02 t-b

Thanks @t-b , this sounds like a useful feature!

bendichter avatar Nov 03 '20 18:11 bendichter

Hi, I would appreciate it if this feature is added. @pgleeson and I are working on a GSoC project and one of the goals is to test NWB files' compatibility with NWBExplorer, thus having the validator's logs will be useful for debugging purposes.

anhknguyen96 avatar Jun 26 '22 10:06 anhknguyen96

Check out NWB inspector. It calls validation and has this json output feature

bendichter avatar Jun 26 '22 14:06 bendichter

NWB inspector calls validation via this method?

The NWB inspector documentation/README file says "This inspector is meant as a companion to the pynwb validator, which checks for strict schema compliance. In contrast, this tool attempts to apply some common sense to find components of the file that are technically compliant, but probably incorrect, or suboptimal, or deviate from best practices". If I understand correctly, users are recommended to use both pynwb validator and NWB inspector, as they serve different purposes?

anhknguyen96 avatar Jun 27 '22 08:06 anhknguyen96

nwb inspector has its own check and calls the validator and returns any errors, so you don't need to call both.

bendichter avatar Jun 27 '22 12:06 bendichter

great, thanks!

anhknguyen96 avatar Jun 28 '22 15:06 anhknguyen96