@@ -41,6 +41,7 @@ from collections import namedtuple
41
41
from collections import defaultdict
42
42
from collections import OrderedDict as ordereddict
43
43
from datetime import datetime
44
+ import os .path as op
44
45
from os .path import isdir
45
46
from os .path import basename
46
47
from os .path import dirname
@@ -1637,35 +1638,22 @@ def populate_bids_templates(path, defaults={}):
1637
1638
]))
1638
1639
1639
1640
sourcedata_README = opj (path , 'sourcedata' , 'README' )
1640
- if exists (dirname (sourcedata_README )):
1641
- create_file_if_missing (
1642
- sourcedata_README ,
1643
- """\
1644
- TODO: Provide description about source data, e.g.
1645
-
1646
- Directory below contains DICOMS compressed into tarballs per each sequence,
1647
- replicating directory hierarchy of the BIDS dataset itself.
1648
- """ )
1649
-
1650
- create_file_if_missing (
1651
- opj (path , 'CHANGES' ),
1652
- """\
1653
- 0.0.1 Initial data acquired
1654
-
1655
- TODOs:
1656
- - verify and possibly extend information in participants.tsv
1657
- (see for example http://datasets.datalad.org/?dir=/openfmri/ds000208)
1658
- - fill out dataset_description.json, README, sourcedata/README (if present)
1659
- - provide _events.tsv file for each _bold.nii.gz with onsets of events
1660
- (see "8.5 Task events" of BIDS specification)
1661
- """ )
1662
-
1663
- create_file_if_missing (
1664
- opj (path , 'README' ),
1665
- """\
1666
- TODO: Provide description for the dataset -- basic details about the study,
1667
- possibly pointing to pre-registration (if public or embargoed)
1668
- """ )
1641
+ if op .exists (op .dirname (sourcedata_README )):
1642
+ create_file_if_missing (sourcedata_README ,
1643
+ ("TODO: Provide description about source data, e.g. \n "
1644
+ "Directory below contains DICOMS compressed into tarballs per "
1645
+ "each sequence, replicating directory hierarchy of the BIDS dataset"
1646
+ " itself." ))
1647
+ create_file_if_missing (op .join (path , 'CHANGES' ),
1648
+ "0.0.1 Initial data acquired\n "
1649
+ "TODOs:\n \t - verify and possibly extend information in participants.tsv"
1650
+ " (see for example http://datasets.datalad.org/?dir=/openfmri/ds000208)"
1651
+ "\n \t - fill out dataset_description.json, README, sourcedata/README"
1652
+ " (if present)\n \t - provide _events.tsv file for each _bold.nii.gz with"
1653
+ " onsets of events (see '8.5 Task events' of BIDS specification)" )
1654
+ create_file_if_missing (op .join (path , 'README' ),
1655
+ "TODO: Provide description for the dataset -- basic details about the "
1656
+ "study, possibly pointing to pre-registration (if public or embargoed)" )
1669
1657
1670
1658
# TODO: collect all task- .json files for func files to
1671
1659
tasks = {}
0 commit comments