Describe the problem
make_dataset_description() accepts a fixed set of keyword arguments (name, authors, doi, funding, acknowledgements, etc.) but does not support Keywords, which is a valid BIDS field in dataset_description.json. Users who want to include keywords must manually patch the JSON after calling make_dataset_description().
Related: #302
Describe your solution
Add a keywords parameter to make_dataset_description():
def make_dataset_description(
path,
name=None,
...,
keywords=None, # NEW: list of str
...,
):
When provided, keywords should be written as the "Keywords" field in dataset_description.json.
Describe possible alternatives
- Manual JSON patching (current workaround) — read, modify, write the JSON after
make_dataset_description().
- Only add
extra_fields — a single generic parameter instead of explicitly adding keywords.
Current downstream workaround (MOABB)
mne_bids.make_dataset_description(path=str(root), overwrite=True, **desc_kwargs)
# Then patch in Keywords manually
desc_path = Path(root) / "dataset_description.json"
with open(desc_path) as f:
desc = json.load(f)
if keywords and "Keywords" not in desc:
desc["Keywords"] = keywords
with open(desc_path, "w") as f:
json.dump(desc, f, indent="\t")
Additional context
Describe the problem
make_dataset_description()accepts a fixed set of keyword arguments (name,authors,doi,funding,acknowledgements, etc.) but does not supportKeywords, which is a valid BIDS field indataset_description.json. Users who want to include keywords must manually patch the JSON after callingmake_dataset_description().Related: #302
Describe your solution
Add a
keywordsparameter tomake_dataset_description():When provided,
keywordsshould be written as the"Keywords"field indataset_description.json.Describe possible alternatives
make_dataset_description().extra_fields— a single generic parameter instead of explicitly addingkeywords.Current downstream workaround (MOABB)
Additional context
Keywordsis defined in the BIDS specification: https://bids-specification.readthedocs.io/en/stable/modality-agnostic-files.html#dataset-description