Skip to content

Commit 4d92848

Browse files
committed
fix: documentation build
1 parent cb4506b commit 4d92848

19 files changed

+172
-100
lines changed

docs/workflows.rst

Lines changed: 9 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -17,52 +17,10 @@ is presented below:
1717
:graph2use: orig
1818
:simple_form: yes
1919

20-
from collections import namedtuple
21-
from niworkflows.utils.spaces import Reference, SpatialReferences
20+
from fmriprep.workflows.tests import mock_config
2221
from fmriprep.workflows.base import init_single_subject_wf
23-
BIDSLayout = namedtuple('BIDSLayout', ('root'))
24-
wf = init_single_subject_wf(
25-
anat_only=False,
26-
aroma_melodic_dim=-200,
27-
bold2t1w_dof=9,
28-
cifti_output=False,
29-
debug=False,
30-
dummy_scans=None,
31-
echo_idx=None,
32-
err_on_aroma_warn=False,
33-
fmap_bspline=False,
34-
fmap_demean=True,
35-
force_syn=True,
36-
freesurfer=True,
37-
hires=True,
38-
ignore=[],
39-
layout=BIDSLayout('.'),
40-
longitudinal=False,
41-
low_mem=False,
42-
medial_surface_nan=False,
43-
name='single_subject_wf',
44-
omp_nthreads=1,
45-
output_dir='.',
46-
reportlets_dir='.',
47-
regressors_all_comps=False,
48-
regressors_dvars_th=1.5,
49-
regressors_fd_th=0.5,
50-
skull_strip_fixed_seed=False,
51-
skull_strip_template=Reference('OASIS30ANTs'),
52-
spaces=SpatialReferences(
53-
spaces=[('MNI152Lin', {}),
54-
('fsaverage', {'density': '10k'}),
55-
('T1w', {}),
56-
('fsnative', {})],
57-
checkpoint=True),
58-
subject_id='test',
59-
t2s_coreg=False,
60-
task_id='',
61-
use_aroma=False,
62-
use_bbr=True,
63-
use_syn=True,
64-
bids_filters=None,
65-
)
22+
mock_config()
23+
wf = init_single_subject_wf()
6624

6725
Preprocessing of structural MRI
6826
-------------------------------
@@ -279,44 +237,14 @@ BOLD preprocessing
279237
:graph2use: orig
280238
:simple_form: yes
281239

240+
from fmriprep.workflows.tests import mock_config
241+
from fmriprep.workflows.bold.base import init_func_preproc_wf
242+
mock_config()
243+
282244
from collections import namedtuple
283245
from niworkflows.utils.spaces import SpatialReferences
284-
from fmriprep.workflows.bold.base import init_func_preproc_wf
285246
BIDSLayout = namedtuple('BIDSLayout', ['root'])
286-
wf = init_func_preproc_wf(
287-
aroma_melodic_dim=-200,
288-
bold2t1w_dof=9,
289-
bold_file='/completely/made/up/path/sub-01_task-nback_bold.nii.gz',
290-
cifti_output=False,
291-
debug=False,
292-
dummy_scans=None,
293-
err_on_aroma_warn=False,
294-
fmap_bspline=True,
295-
fmap_demean=True,
296-
force_syn=True,
297-
freesurfer=True,
298-
ignore=[],
299-
low_mem=False,
300-
medial_surface_nan=False,
301-
omp_nthreads=1,
302-
output_dir='.',
303-
regressors_all_comps=False,
304-
regressors_fd_th=0.5,
305-
regressors_dvars_th=1.5,
306-
reportlets_dir='.',
307-
t2s_coreg=False,
308-
spaces=SpatialReferences(
309-
spaces=[('MNI152Lin', {}),
310-
('fsaverage', {'density': '10k'}),
311-
('T1w', {}),
312-
('fsnative', {})],
313-
checkpoint=True),
314-
use_aroma=False,
315-
use_bbr=True,
316-
use_syn=True,
317-
layout=BIDSLayout('.'),
318-
num_bold=1,
319-
)
247+
wf = init_func_preproc_wf('sub-01_task-nback_bold.nii.gz')
320248

321249
Preprocessing of :abbr:`BOLD (blood-oxygen level-dependent)` files is
322250
split into multiple sub-workflows described below.
@@ -396,7 +324,7 @@ Slice time correction
396324
wf = init_bold_stc_wf(
397325
metadata={'RepetitionTime': 2.0,
398326
'SliceTiming': [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]},
399-
)
327+
)
400328

401329
If the ``SliceTiming`` field is available within the input dataset metadata,
402330
this workflow performs slice time correction prior to other signal resampling

fmriprep/config.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ def init_layout():
499499
execution._layout = BIDSLayout(
500500
str(execution.bids_dir),
501501
validate=False,
502-
database_path=str(work_dir),
502+
# database_path=str(work_dir),
503503
ignore=("code", "stimuli", "sourcedata", "models",
504504
"derivatives", re.compile(r'^\.')))
505505
execution.layout = execution._layout
@@ -522,10 +522,13 @@ def set_logger_level():
522522
def init_spaces(checkpoint=True):
523523
"""Get a spatial references."""
524524
from niworkflows.utils.spaces import Reference, SpatialReferences
525-
if getattr(workflow, 'spaces'):
525+
if (
526+
getattr(workflow, 'spaces')
527+
and isinstance(workflow.spaces, SpatialReferences)
528+
):
526529
return
527530

528-
spaces = getattr(execution, 'output_spaces')
531+
spaces = execution.output_spaces
529532
if spaces is not None and not isinstance(spaces, _SRs):
530533
spaces = SpatialReferences(
531534
[ref for s in execution.output_spaces.split(' ')
@@ -537,7 +540,7 @@ def init_spaces(checkpoint=True):
537540
if checkpoint:
538541
spaces.checkpoint()
539542

540-
internal = getattr(workflow, 'internal_spaces')
543+
internal = workflow.internal_spaces
541544
if internal is not None and internal.strip():
542545
spaces += [ref for s in internal.split(' ')
543546
for ref in Reference.from_string(s)]

fmriprep/data/tests/config.toml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
[environment]
2+
cpu_count = 8
3+
exec_env = "posix"
4+
free_mem = 2.2
5+
overcommit_policy = "heuristic"
6+
overcommit_limit = "50%"
7+
nipype_version = "1.5.0"
8+
templateflow_version = "0.4.2"
9+
version = "20.0.1"
10+
11+
[execution]
12+
bids_dir = "ds000005/"
13+
bids_description_hash = "5d42e27751bbc884eca87cb4e62b9a0cca0cd86f8e578747fe89b77e6c5b21e5"
14+
boilerplate_only = false
15+
fs_license_file = "/opt/freesurfer/license.txt"
16+
fs_subjects_dir = "/opt/freesurfer/subjects"
17+
log_dir = "/home/oesteban/tmp/fmriprep-ds005/out/fmriprep/logs"
18+
log_level = 40
19+
low_mem = false
20+
md_only_boilerplate = false
21+
notrack = true
22+
output_dir = "/tmp"
23+
output_spaces = "MNI152NLin2009cAsym:res-2 MNI152NLin2009cAsym:res-native fsaverage:den-10k fsaverage:den-30k"
24+
reports_only = false
25+
run_uuid = "20200306-105302_d365772b-fd60-4741-a722-372c2f558b50"
26+
participant_label = [ "01",]
27+
templateflow_home = "~/.cache/templateflow"
28+
work_dir = "work/"
29+
write_graph = false
30+
31+
[workflow]
32+
anat_only = false
33+
aroma_err_on_warn = false
34+
aroma_melodic_dim = -200
35+
bold2t1w_dof = 6
36+
fmap_bspline = false
37+
force_syn = false
38+
hires = true
39+
ignore = []
40+
internal_spaces = "fsaverage:den-164k MNI152NLin6Asym:res-2"
41+
longitudinal = false
42+
medial_surface_nan = false
43+
regressors_all_comps = false
44+
regressors_dvars_th = 1.5
45+
regressors_fd_th = 0.5
46+
run_reconall = true
47+
skull_strip_fixed_seed = false
48+
skull_strip_template = "OASIS30ANTs"
49+
t2s_coreg = false
50+
use_aroma = false
51+
52+
[nipype]
53+
crashfile_format = "txt"
54+
get_linked_libs = false
55+
memory_gb = 32
56+
nprocs = 8
57+
omp_nthreads = 8
58+
plugin = "MultiProc"
59+
resource_monitor = false
60+
stop_on_first_crash = false
61+
62+
[nipype.plugin_args]
63+
maxtasksperchild = 1
64+
raise_insufficient = false

fmriprep/data/tests/ds000005/CHANGES

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2.0.1 2016-10-21
2+
3+
- Added authors to dataset_discription.json
4+
5+
1.0.1 2016-02-18
6+
7+
- Update orientation information in nifti header for improved left-right determination
8+
9+
10+
1.0.0 2011-10-06
11+
12+
- initial release

fmriprep/data/tests/ds000005/README

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
This dataset was obtained from the OpenfMRI project (http://www.openfmri.org).
2+
Accession #: ds005
3+
Description: Mixed-gambles task
4+
5+
Please cite the following references if you use these data:
6+
7+
Tom, S.M., Fox, C.R., Trepel, C., Poldrack, R.A. (2007). The neural basis of loss aversion in decision-making under risk. Science, 315(5811):515-8
8+
9+
10+
Release history:
11+
10/06/2011: initial release
12+
3/21/2013: Updated release with QA information
13+
2/18/2016: Update orientation information in nifti header for improved left-right determination
14+
15+
This dataset is made available under the Public Domain Dedication and License
16+
v1.0, whose full text can be found at
17+
http://www.opendatacommons.org/licenses/pddl/1.0/.
18+
We hope that all users will follow the ODC Attribution/Share-Alike
19+
Community Norms (http://www.opendatacommons.org/norms/odc-by-sa/);
20+
in particular, while not legally required, we hope that all users
21+
of the data will acknowledge the OpenfMRI project and NSF Grant
22+
OCI-1131441 (R. Poldrack, PI) in any publications.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"BIDSVersion": "1.0.0rc4",
3+
"License": "This dataset is made available under the Public Domain Dedication and License \nv1.0, whose full text can be found at \nhttp://www.opendatacommons.org/licenses/pddl/1.0/. \nWe hope that all users will follow the ODC Attribution/Share-Alike \nCommunity Norms (http://www.opendatacommons.org/norms/odc-by-sa/); \nin particular, while not legally required, we hope that all users \nof the data will acknowledge the OpenfMRI project and NSF Grant \nOCI-1131441 (R. Poldrack, PI) in any publications.",
4+
"Name": "Mixed-gambles task",
5+
"Authors": ["Tom, S.M.", "Fox, C.R.", "Trepel, C.", "Poldrack, R.A."],
6+
"ReferencesAndLinks": "Tom, S.M., Fox, C.R., Trepel, C., Poldrack, R.A. (2007). The neural basis of loss aversion in decision-making under risk. Science, 315(5811):515-8"
7+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
participant_id sex age
2+
sub-01 M 28
3+
sub-02 F 21
4+
sub-03 F 27
5+
sub-04 M 25
6+
sub-05 F 20
7+
sub-06 M 20
8+
sub-07 F 24
9+
sub-08 M 25
10+
sub-09 F 19
11+
sub-10 M 20
12+
sub-11 M 20
13+
sub-12 M 21
14+
sub-13 F 22
15+
sub-14 F 19
16+
sub-15 F 20
17+
sub-16 M 22
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)