Skip to content

Commit 57b9b0c

Browse files
committed
RF: make datalad use fake dates timeline (by default).
To "disable" someone would need to precreate the dataset without --fake-dates.
1 parent 312cd2e commit 57b9b0c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

heudiconv/external/dlad.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def add_to_datalad(topdir, studydir, msg, bids):
4141
assert external_versions['datalad'] >= MIN_VERSION, (
4242
"Need datalad >= {}".format(MIN_VERSION)) # add to reqs
4343

44+
create_kwargs = {}
45+
if external_versions['datalad'] >= '0.10':
46+
create_kwargs['fake_dates'] = True # fake dates by default
47+
4448
studyrelpath = op.relpath(studydir, topdir)
4549
assert not studyrelpath.startswith(op.pardir) # so we are under
4650
# now we need to test and initiate a DataLad dataset all along the path
@@ -58,7 +62,9 @@ def add_to_datalad(topdir, studydir, msg, bids):
5862
force=True,
5963
no_annex=True,
6064
# shared_access='all',
61-
annex_version=6)
65+
annex_version=6,
66+
**create_kwargs
67+
)
6268
assert ds == ds_
6369
assert ds.is_installed()
6470
superds = ds
@@ -113,7 +119,8 @@ def add_to_datalad(topdir, studydir, msg, bids):
113119
"yet provided", ds)
114120
else:
115121
dsh = ds.create(path='.heudiconv',
116-
force=True
122+
force=True,
123+
**create_kwargs
117124
# shared_access='all'
118125
)
119126
# Since .heudiconv could contain sensitive information

0 commit comments

Comments
 (0)