Skip to content

Commit 868b80c

Browse files
committed
fix: improve documentation and handle better artifacts in Circle
1 parent d51977a commit 868b80c

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

.circleci/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ jobs:
166166
printf "[execution]\nstop_on_first_crash = true\n" > /tmp/ds005/nipype.cfg
167167
echo "poll_sleep_duration = 0.01" >> /tmp/ds005/nipype.cfg
168168
echo "hash_method = content" >> /tmp/ds005/nipype.cfg
169+
echo "crashfile_format = txt" >> /tmp/ds005/nipype.cfg
169170
cp /tmp/ds005/nipype.cfg /tmp/ds054/nipype.cfg
170171
cp /tmp/ds005/nipype.cfg /tmp/ds210/nipype.cfg
171172
- persist_to_workspace:
@@ -404,6 +405,8 @@ jobs:
404405
--output-spaces MNI152NLin2009cAsym fsaverage5 fsnative MNI152NLin6Asym anat \
405406
--use-plugin /home/circleci/src/fmriprep/.circleci/legacy.yml \
406407
--nthreads 2 --cifti-output -vv
408+
- store_artifacts:
409+
path: /tmp/ds005/derivatives
407410
- run:
408411
name: Move intermediate results for second run
409412
command: |
@@ -458,7 +461,7 @@ jobs:
458461
-exec sh -c 'rm -f {}; touch {}' \;
459462
460463
- store_artifacts:
461-
path: /tmp/ds005
464+
path: /tmp/ds005/work
462465

463466
ds054:
464467
machine:

fmriprep/config.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,17 @@
108108
# Access configs from any code section as:
109109
value = config.section.setting
110110
111-
Other responsibilities
112-
----------------------
113111
Logging
114-
.......
112+
-------
113+
.. autoclass:: loggers
114+
:members:
115115
116+
Other responsibilities
117+
----------------------
116118
The :py:mod:`config` is responsible for other conveniency actions.
117119
118120
* Switching Python's ``multiprocessing`` to *forkserver* mode.
119121
* Set up a filter for warnings as early as possible.
120-
* Initialize/crawl runtime descriptive settings (e.g., default FreeSurfer license,
121-
execution environment, nipype and *fMRIPrep* versions, etc.).
122122
* Automated I/O magic operations:
123123
124124
* :obj:`Path` \<-\> :obj:`str` \<-\> :obj:`Path`).
@@ -264,6 +264,8 @@ class environment(_Config):
264264
"""
265265
Read-only options regarding the platform and environment.
266266
267+
Crawls runtime descriptive settings (e.g., default FreeSurfer license,
268+
execution environment, nipype and *fMRIPrep* versions, etc.).
267269
The ``environment`` section is not loaded in from file,
268270
only written out when settings are exported.
269271
This config section is useful when reporting issues,
@@ -335,9 +337,7 @@ class execution(_Config):
335337
"""Configure run-level settings."""
336338

337339
bids_dir = None
338-
"""An existing path to the dataset, which must be BIDS-compliant.
339-
This config mutates to a :py:class:`~bids.layout.BIDSLayout` after calling
340-
:py:func:`~fmriprep.config.init_layout`."""
340+
"""An existing path to the dataset, which must be BIDS-compliant."""
341341
bids_description_hash = None
342342
"""Checksum (SHA256) of the ``dataset_description.json`` of the BIDS dataset."""
343343
bids_filters = None
@@ -353,7 +353,8 @@ class execution(_Config):
353353
fs_subjects_dir = None
354354
"""FreeSurfer's subjects directory."""
355355
layout = None
356-
"""The path to the exported index of a py:class:`~bids.layout.BIDSLayout` object."""
356+
"""A py:class:`~bids.layout.BIDSLayout` object, see
357+
:py:func:`~fmriprep.config.init_layout`."""
357358
log_dir = None
358359
"""The path to a directory that contains execution logs."""
359360
log_level = 25
@@ -455,18 +456,18 @@ class workflow(_Config):
455456
spaces = None
456457
"""Standard and nonstandard spaces."""
457458
t2s_coreg = None
458-
"""Co-register echos before generating the T2\\* reference of \
459+
"""Co-register echos before generating the T2\\* reference of
459460
:abbr:`ME-EPI (multi-echo echo-planar imaging)`."""
460461
use_aroma = None
461-
"""Run ICA-AROMA."""
462+
"""Run ICA-:abbr:`AROMA (automatic removal of motion artifacts)`."""
462463
use_bbr = None
463-
"""Run boundary-based registration for BOLD-to-T1w registration (default: ``True``)."""
464+
"""Run boundary-based registration for BOLD-to-T1w registration."""
464465
use_syn = None
465-
"""Run *fieldmap-less* susceptibility-derived distortions estimation \
466+
"""Run *fieldmap-less* susceptibility-derived distortions estimation
466467
in the absence of any alternatives."""
467468

468469

469-
class loggers(_Config):
470+
class loggers:
470471
"""
471472
Setup loggers, providing access to them across the *fMRIPrep* run.
472473
@@ -546,7 +547,7 @@ def to_filename(filename):
546547

547548

548549
def init_layout():
549-
"""Create a new BIDS Layout on :attr:`~execution.bids_dir`."""
550+
"""Create a new BIDS Layout accessible with :attr:`~execution.layout`."""
550551
if execution._layout is None:
551552
import re
552553
from bids.layout import BIDSLayout

0 commit comments

Comments
 (0)