Skip to content

Commit 1f11abb

Browse files
authored
Merge pull request #1722 from poldracklab/docs/custom-templates-link
DOC: Add link to documentation in help of ``--output-spaces`` argument
2 parents a0c12c5 + 9522299 commit 1f11abb

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

fmriprep/cli/run.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def get_parser():
4646
from .version import check_latest, is_flagged
4747

4848
verstr = 'fmriprep v{}'.format(__version__)
49+
currentv = Version(__version__)
50+
is_release = not any((currentv.is_devrelease, currentv.is_prerelease, currentv.is_postrelease))
4951

5052
parser = ArgumentParser(description='FMRIPREP: fMRI PREProcessing workflows',
5153
formatter_class=RawTextHelpFormatter)
@@ -140,8 +142,11 @@ def get_parser():
140142
Non-standard spaces (valid keywords: %s) imply specific orientations and sampling \
141143
grids. \
142144
Important to note, the ``res-*`` modifier does not define the resolution used for \
143-
the spatial normalization """ % (', '.join('"%s"' % s for s in templates()),
144-
', '.join(NONSTANDARD_REFERENCES)))
145+
the spatial normalization.
146+
For further details, please check out \
147+
https://fmriprep.readthedocs.io/en/%s/spaces.html""" % (
148+
', '.join('"%s"' % s for s in templates()), ', '.join(NONSTANDARD_REFERENCES),
149+
currentv.base_version if is_release else 'latest'))
145150

146151
g_conf.add_argument(
147152
'--output-space', required=False, action='store', type=str, nargs='+',
@@ -276,9 +281,7 @@ def get_parser():
276281
g_other.add_argument('--sloppy', action='store_true', default=False,
277282
help='Use low-quality tools for speed - TESTING ONLY')
278283

279-
currentv = Version(__version__)
280284
latest = check_latest()
281-
282285
if latest is not None and currentv < latest:
283286
print("""\
284287
You are using fMRIPrep-%s, and a newer version of fMRIPrep is available: %s.

0 commit comments

Comments
 (0)