-
Notifications
You must be signed in to change notification settings - Fork 0
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
Please submit pointers to your validator output formats #1
Comments
The NWB validator can be called from the command line and as a Python function. The CLI is described here. When validation passes, the output looks like:
with exit code 0. When it fails, it looks like:
with exit code 1. The Python function is described here. Using the |
FWIW, here is where we are mapping ValidationResult(
origin=ValidationOrigin(
name="pynwb",
version=pynwb.__version__,
),
severity=Severity.WARNING,
id=f"pywnb.{error_output}",
scope=Scope.FILE,
path=Path(path),
message="Failed to validate.",
) but that is quite suboptimal since there is only |
Thanks @yarikoptic . The pynwb validator errors are parseable. I tried to address this in dandi/dandi-cli#1513 |
The HED Python validator represents each issue as a dictionary and the error list is a list of these dictionaries. The error code is used to select a template for composing the error message from the dictionary. Most of our calling functions then get a printable issue string for these. The issue list could trivially be output as JSON but it maximizing usefulness would take some thought. I guess the first step for us would be to define a JSON schema for the format of the issue list (which we currently don't have). We have a lot of fields, some of which correspond to yours and some don't. |
Thank you @VisLab , of special interest would be those which don't ATM have anything corresponding. Would you be so kind to create a list/table of them? |
I went over the hed-python code. There are single issue and context keys. The actual issue objects are nested a tree structure so that the context that applies to multiple issues can be easily printed once. This tree could be flattened. Single issue keys
Context keys:
Sample tree structure of the issues:
|
The sparc validator is a bit weird in that except in cases where something breaks due to a bug in the validator itself we return the export as is or remove the malformed data (with a note in the validator that it has been removed). The validator output is embedded as errors sections within objects and a summary is lifted out, however that is not currently described in the linked schema below because we don't validate that part of the export, so I will updated the schema so that it is at least visible. https://github.com/SciCrunch/sparc-curation/blob/master/sparcur/schemas.py "path_error_report": {
"#/inputs/dataset_description_file": {
"error_count": 6,
"messages": [
"'description' is a required property",
"'name' is a required property",
"'protocol_url_or_doi' is a required property"
]
},
"#/inputs/manifest_file/-1/checksums/-1": {
"error_count": 1,
"messages": [
"{'type': 'checksum', ... 44 bytes later ... e3531d7671eab8911'} is not valid under any of the given schemas"
]
},
"#/inputs/submission_file/submission": {
"error_count": 1,
"messages": [
"{'consortium_data_st ... 69 bytes later ... er': 'U19NS130608'} is not valid under any of the given schemas"
]
},
"#/meta/award_number": {
"error_count": 1,
"messages": [
"'U19NS130608' does not match '^(OT2OD|OT3OD|U18|TR|U01)'"
]
},
"#/meta/techniques/-1": {
"error_count": 2,
"messages": [
"'RNA -seq' is not a 'iri'",
"'single-cell RNA sequencing' is not a 'iri'"
]
}
} |
Please checkout README in https://github.com/con/validation for the motivations etc.
The text was updated successfully, but these errors were encountered: