Skip to content
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

empty dataset name and authors #1581

Closed
Remi-Gau opened this issue Jan 11, 2023 · 5 comments
Closed

empty dataset name and authors #1581

Remi-Gau opened this issue Jan 11, 2023 · 5 comments

Comments

@Remi-Gau
Copy link
Contributor

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.

@sappelhoff
Copy link
Member

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".

@effigies
Copy link
Collaborator

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.

@Remi-Gau
Copy link
Contributor Author

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

that would be nice

@mateuszpawlik
Copy link

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

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Feb 16, 2024

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

https://github.com/bids-standard/bids-examples/actions/runs/7928356588/job/21646448322?pr=426#step:8:373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants