datalad-neuroimaging icon indicating copy to clipboard operation
datalad-neuroimaging copied to clipboard

cfg_bids -- template it out

Open yarikoptic opened this issue 5 years ago • 1 comments

I first wanted to check on resistance or desire for such a change. I wondered to move "templating" of some files (e.g. dataset_description.json, CHANGES, README) from https://github.com/nipy/heudiconv/blob/master/heudiconv/bids.py#L33 into the cfg_bids procedure here.

We could also make use of git config user.name for the Author. The other fields could also be queried from the dataset.config (e.g. bids-template.license, bids-template.acknowledgements), so account wide config settings could be setup to uniformly populate them for new datasets.

yarikoptic avatar May 03 '19 15:05 yarikoptic

My 2ct:

I don't mind in general, but I have not had good experience with pre-filled README templates generated before seeing all data. They tend to get wiped out and replaced by something better later on. Here we would face the issue that README content is part of the BIDS metadata, so any "junk" makes it into the metadata report until it gets fixed -- and it never is ....

I personally consider it a more viable approach to use all available metadata to general a full blown README rather than a stub (e.g. like https://github.com/datalad/datalad-deprecated/issues/76)

We could also make use of git config user.name for the Author. The other fields could also be queried from the dataset.config (e.g. bids-template.license, bids-template.acknowledgements), so account wide config settings could be setup to uniformly populate them for new datasets.

Apart from author (where a single author is likely wrong for any real BIDS dataset), this would mean that instead of dropping a dataset_description.json right away, we would use the dataset config as an intermediate data structure that needs to be populated in order to get the same information back out in a different format. Subsequently, the config would need to be cleaned, as the now existing dataset_description.json is the canonical source of BIDS metadata -- or we have duplicates lying around.

That being said, there is nothing wrong in general with using (configurable) defaults for file content. For example, we do need a dataset_description.json in every dataset that pybids shall be able to work with. It minimum content is {"name": "notsure", "BIDSVersion": "1"}.

mih avatar May 07 '19 11:05 mih