bids-validator
bids-validator copied to clipboard
empty dataset name and authors
Just tested it and validation passes without warning if leave an empty string ("") or just spaces (" ") for the dataset_descrtiption name .
Same for Authors.
This probably deserves a warning.
that's our old issue with generating warnings for JSON schema based validation. In that workflow we currently only have:
- fail with an often cryptic error message because the schema is violated
- succeed because the schema is adhered to
perhaps it'd be easier to explicitly forbid "whitespace-only" strings in the JSON schema, for example via a "pattern".
Name: #1572 will be in the next release.
Authors is supposed to be a list. There should be a warning if the list is empty or the field is missing NO_AUTHORS:
https://github.com/bids-standard/bids-validator/blob/40206be37d9db2114ed16e8891625f65a1aab449/bids-validator/utils/issues/list.js#L613-L618
Implementation is here:
https://github.com/bids-standard/bids-validator/blob/40206be37d9db2114ed16e8891625f65a1aab449/bids-validator/validators/bids/checkDatasetDescription.js#L49-L78
Tests are here:
https://github.com/bids-standard/bids-validator/blob/40206be37d9db2114ed16e8891625f65a1aab449/bids-validator/validators/bids/tests/checkDatasetDescription.spec.js#L78-L99
We could add an EMPTY_AUTHOR issue, just like the 2+ commas issue, and warn if author.strip().length == 0.
We could add an
EMPTY_AUTHORissue, just like the 2+ commas issue, and warn ifauthor.strip().length == 0.
that would be nice
FYI I just got code: 113 - NO_AUTHORS although I have authors in CITATION.cff file, as recommended.
FYI I just got
code: 113 - NO_AUTHORSalthough I have authors in CITATION.cff file, as recommended.
- Could reproduce in this PR to the bids example: https://github.com/bids-standard/bids-examples/pull/426
https://github.com/bids-standard/bids-examples/actions/runs/7928356588/job/21646448322?pr=426#step:8:373