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

Make MACROS___make_metadata_table to use schema #2016

Open
yarikoptic opened this issue Dec 19, 2024 · 0 comments
Open

Make MACROS___make_metadata_table to use schema #2016

yarikoptic opened this issue Dec 19, 2024 · 0 comments

Comments

@yarikoptic
Copy link
Collaborator

ATM we duplicate values from schema into calls to MACROS___make_metadata_table, e.g. in

Every dataset MUST include this file with the following fields:

<!-- This block generates a metadata table.
The definitions of these fields can be found in
  src/schema/objects/metadata.yaml
and a guide for using macros can be found at
 https://github.com/bids-standard/bids-specification/blob/master/macros_doc.md
-->
{{ MACROS___make_metadata_table(
   {
      "Name": "REQUIRED",
      "BIDSVersion": "REQUIRED",
      "HEDVersion": "RECOMMENDED",
      "DatasetLinks": "REQUIRED if [BIDS URIs][] are used",
      "DatasetType": "RECOMMENDED",
      "License": "RECOMMENDED",
      "Authors": "RECOMMENDED if CITATION.cff is not present",
      "Acknowledgements": "OPTIONAL",
      "HowToAcknowledge": "OPTIONAL",
      "Funding": "OPTIONAL",
      "EthicsApprovals": "OPTIONAL",
      "ReferencesAndLinks": "OPTIONAL",
      "DatasetDOI": "OPTIONAL",
      "GeneratedBy": "RECOMMENDED",
      "SourceDatasets": "RECOMMENDED",
   }
) }}

for dataset_description.json although that all is prescribed in https://github.com/bids-standard/bids-specification/blob/HEAD/src/schema/rules/dataset_metadata.yaml which also hints on that above is not entirely "complete" - some fields might be REQUIRED whenever above RECOMMENDED for some types of packages, and misses Genetics altogether.

As duplication is source of all kinds of bugs, I think we should strive to automate generation there, pretty my via smth like MACROS___make_metadata_table_for_path(path == "/dataset_description.json") . I am not yet sure yet how feasible to fully automate across all possible conditions etc, just stating that we should look into it ;-)

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

1 participant