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

fix(schema): Authors is recommended if CITATION.cff is absent #1916

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modality-agnostic-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ and a guide for using macros can be found at
"DatasetLinks": "REQUIRED if [BIDS URIs][] are used",
"DatasetType": "RECOMMENDED",
"License": "RECOMMENDED",
"Authors": "RECOMMENDED",
"Authors": "RECOMMENDED if CITATION.cff is not present",
"Acknowledgements": "OPTIONAL",
"HowToAcknowledge": "OPTIONAL",
"Funding": "OPTIONAL",
Expand Down
23 changes: 16 additions & 7 deletions src/schema/rules/dataset_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,8 @@ dataset_description:
DatasetType: recommended
License: recommended
Authors:
level: recommended
issue:
code: NO_AUTHORS
message: |
The Authors field of dataset_description.json should contain an array of fields -
with one author per field. This was triggered because there are no authors, which
will make DOI registration from dataset metadata impossible.
level: optional
level_addendum: recommended if no CITATION.cff file is present
Acknowledgements: optional
HowToAcknowledge: optional
Funding: optional
Expand All @@ -24,6 +19,20 @@ dataset_description:
GeneratedBy: recommended
SourceDatasets: recommended

dataset_authors:
selectors:
- path == "/dataset_description.json"
- '!exists("CITATION.cff", "dataset")'
fields:
Authors:
level: recommended
issue:
code: NO_AUTHORS
message: |
The Authors field of dataset_description.json should contain an array of fields -
with one author per field. This was triggered because there are no authors, which
will make DOI registration from dataset metadata impossible.

derivative_description:
selectors:
- path == "/dataset_description.json"
Expand Down