Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.

WIP: Generates default dataset_description.json if not present #1134

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
10 changes: 8 additions & 2 deletions AFQ/api/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,14 @@ def __init__(self,
if not op.exists(bids_path):
raise ValueError("bids_path not found")
if not op.exists(op.join(bids_path, "dataset_description.json")):
raise ValueError("There must be a dataset_description.json"
+ " in bids_path")
dataset_description = {
"Name": "unknown",
"BIDSVersion": "unknown",
"Authors": ["unknown"]
}
dd_file = op.join(bids_path, 'dataset_description.json')
with open(dd_file, 'w') as outfile:
json.dump(dataset_description, outfile)
if not isinstance(bids_filters, dict):
raise TypeError("bids_filters must be a dict")
# preproc_pipeline typechecking handled by pyBIDS
Expand Down
Loading