From 061cb6f0fa133dbaf3fb62821bc34604be5da736 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sat, 24 Jun 2023 04:58:40 +0200 Subject: [PATCH 1/3] ENH: Permit CITATION.cff as strict alternative to Authors field --- src/schema/rules/checks/dataset.yaml | 12 ++++++++++++ src/schema/rules/files/common/core.yaml | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/schema/rules/checks/dataset.yaml b/src/schema/rules/checks/dataset.yaml index 4012eca8fb..fd5ab61511 100644 --- a/src/schema/rules/checks/dataset.yaml +++ b/src/schema/rules/checks/dataset.yaml @@ -62,3 +62,15 @@ UnknownVersion: - path == 'dataset_description.json' checks: - intersects([json.BIDSVersion], schema.meta.versions) + +SingleSourceAuthors: + issue: + code: AUTHORS_AND_CITATION_FILE_MUTUALLY_EXCLUSIVE + level: error + message: | + CITATION.cff file found. The "Authors" field of dataset_description.json + must be removed to avoid inconsistency. + selectors: + - path == 'CITATION.cff' + checks: + - '!("Authors" in dataset.dataset_description)' diff --git a/src/schema/rules/files/common/core.yaml b/src/schema/rules/files/common/core.yaml index cacc3e0c41..2fad28f430 100644 --- a/src/schema/rules/files/common/core.yaml +++ b/src/schema/rules/files/common/core.yaml @@ -5,6 +5,9 @@ dataset_description: level: required path: dataset_description.json +CITATION: + level: optional + path: CITATION.cff README: level: recommended stem: README From d19363ef240bd19f9a998566a03c61b5274e31e7 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Sat, 24 Jun 2023 19:33:33 +0000 Subject: [PATCH 2/3] ENH: Add CITATION schema file and recommend preference over dataset_description --- src/modality-agnostic-files.md | 15 +++++++++++++++ src/schema/objects/files.yaml | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/src/modality-agnostic-files.md b/src/modality-agnostic-files.md index d598f76e38..b424ef52b6 100644 --- a/src/modality-agnostic-files.md +++ b/src/modality-agnostic-files.md @@ -167,6 +167,21 @@ A guide for using macros can be found at --> {{ MACROS___render_text("objects.files.README.description") }} +### `CITATION.cff` + + +{{ MACROS___render_text("objects.files.CITATION.description") }} + +For most redundant fields between `CITATION.cff` and `dataset_description.json`, +the `CITATION.cff` SHOULD take precedence. +To avoid inconsistency, metadata present in `CITATION.cff` SHOULD NOT be +be included in `dataset_description.json`, with the exception of `Name` and +`DatasetDOI`, to ensure that `CITATION.cff`-unaware tools can generate +references to the dataset. + ### `CHANGES`