bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

empty dataset name and authors

Open Remi-Gau opened this issue 2 years ago • 5 comments
trafficstars

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.

Remi-Gau avatar Jan 11 '23 12:01 Remi-Gau

that's our old issue with generating warnings for JSON schema based validation. In that workflow we currently only have:

  1. fail with an often cryptic error message because the schema is violated
  2. 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".

sappelhoff avatar Jan 11 '23 14:01 sappelhoff

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.

effigies avatar Jan 11 '23 14:01 effigies

We could add an EMPTY_AUTHOR issue, just like the 2+ commas issue, and warn if author.strip().length == 0.

that would be nice

Remi-Gau avatar Jan 11 '23 15:01 Remi-Gau

FYI I just got code: 113 - NO_AUTHORS although I have authors in CITATION.cff file, as recommended.

mateuszpawlik avatar Feb 15 '24 09:02 mateuszpawlik

FYI I just got code: 113 - NO_AUTHORS although 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

Remi-Gau avatar Feb 16 '24 09:02 Remi-Gau