-
Notifications
You must be signed in to change notification settings - Fork 28
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
validate: RF to collect/output more informative structured records #943
Comments
@yarikoptic To be clear, my utopian idea was that we could tell where errors in the BIDS dataset arose. For example:
When I look at the logical metadata now, I see
|
@effigies thanks for bringing it up. Please correct me or just elaborate:
WDYT @effigies ? [1] may be some other name to not overlap since our asset was envisioned to be such a collection but ended up being at large 1-to-1 mapping from file or a directory (.zarr/) into an asset edit 1: added |
Some incomplete thinking about `path`s (absolute/relative/etc)
|
* origin/master: Removed deprecated parameter Depending on bidsschematools Removed debug option Using upstream schema reference root specification Dropped reference log Let's see how this goes Add test get_content_url(): If a HEAD fails, return the failing URL Update CHANGELOG.md [skip ci] DOC: minor - boost copyright years in the docs
Currently
validate
is just collecting a list of string error representations. As @CodyCBakerPhD mentions in https://github.com/dandi/dandi-cli/pull/941/files#r830671373 , nwbinspector provides more informative result records with contextual information about the error etc.Similarly for BIDS validation being added in #896 error messages are also serialized/simplified, although stock
bids-validator
has quite an extensive registry of warnings/errors: google spreadsheetLooking forward we should establish a ValidationResult data type/class/record which would be expressive to cover validation results from various validators. I foresee it to also reflect the "source" of the validation result, so overall should have (more to be filled out later on; yet to look at what nwbinspector provides):
origin
: what produced this validation resultname: str
,{"pynwb.load", "pynwb.validate", "nwbinspector", "dandischema", "dandi-bids", "ome-zarr"}
version: str
-- version of the tool producing the result, e.g."0.3.1"
severity: {'ERROR', 'WARNING', 'HINT'}
-- for now just reflectingid: str
(orid: list
?) -- identifier of that particular type of result. For BIDS could be its Key or numeric ID. Providing a unique string ID like BIDS does quite nice since gives immediate summary in its namescope: {'file', 'dandiset'}
-- either it ispath: str
- path to file or folder/dataset (e.g. BIDS of dandiset) which triggered the errorasset_paths: Optional[list[str]]
- defaults to[.path]
if not defined. Otherwise - could point to an actual file (or collection of files) which are affected by a warning/error in the.path
. E.g.{"path": "task-broken_bold.json", "asset_paths": ["sub-01/func/sub-01_task-broken_bold.json", "sub-02/func/sub-02_task-broken_bold.json"]}
.dataset_path: Optional[str]
-- path to the dataset based on validation of which message is based (e.g. could be a nested BIDS dataset, or not present forpynwb
validations since they do not care)message: str
- it would be the "Reason" of BIDS or a string interpolation of nwbinspector record?Use
dandi validate
should gain--severity=HINT,WARNING,ERROR
switch to provide minimal level for what to include in the reportdandi upload
should use validate withseverity='ERROR'
thus only allowing for uploads without errors but possibly which would trigger WARNINGs and any other lower level problemsedits:
@dataclass
describing InspectorMessage: https://github.com/NeurodataWithoutBorders/nwbinspector/blob/dev/nwbinspector/register_checks.py#L38The text was updated successfully, but these errors were encountered: