Skip to content

Commit 8c2ae68

Browse files
committed
ENH: Generate README/CHANGES/.. the same as master (no line wrapping etc)
1 parent 46e467b commit 8c2ae68

File tree

1 file changed

+17
-29
lines changed

1 file changed

+17
-29
lines changed

bin/heudiconv

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ from collections import namedtuple
4141
from collections import defaultdict
4242
from collections import OrderedDict as ordereddict
4343
from datetime import datetime
44+
import os.path as op
4445
from os.path import isdir
4546
from os.path import basename
4647
from os.path import dirname
@@ -1637,35 +1638,22 @@ def populate_bids_templates(path, defaults={}):
16371638
]))
16381639

16391640
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)")
16691657

16701658
# TODO: collect all task- .json files for func files to
16711659
tasks = {}

0 commit comments

Comments
 (0)