Skip to content

Commit

Permalink
fix(doc-build): Address errors/warnings in RTD builds (#3325)
Browse files Browse the repository at this point in the history
* sphinx-argparse v0.5.0 broke our builds, so blacklist:
sphinx-doc/sphinx-argparse#56
* Backport some fixes from #3312.
  • Loading branch information
effigies committed Jul 16, 2024
1 parent 2363568 commit 58edc11
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 15 deletions.
38 changes: 25 additions & 13 deletions docs/workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ single reference template (see `Longitudinal processing`_).

from niworkflows.utils.spaces import Reference, SpatialReferences
from smriprep.workflows.anatomical import init_anat_preproc_wf
spaces=SpatialReferences([
('MNI152Lin', {}),
('fsaverage', {'density': '10k'}),
('T1w', {}),
('fsnative', {})
])
spaces.checkpoint()
wf = init_anat_preproc_wf(
bids_root='.',
freesurfer=True,
Expand All @@ -71,12 +78,7 @@ single reference template (see `Longitudinal processing`_).
output_dir='.',
skull_strip_mode='force',
skull_strip_template=Reference('MNI152NLin2009cAsym'),
spaces=SpatialReferences([
('MNI152Lin', {}),
('fsaverage', {'density': '10k'}),
('T1w', {}),
('fsnative', {})
]),
spaces=spaces,
skull_strip_fixed_seed=False,
t1w=['sub-01/anat/sub-01_T1w.nii.gz'],
t2w=[],
Expand Down Expand Up @@ -267,9 +269,9 @@ packages, including FreeSurfer and the `Connectome Workbench`_.
:simple_form: yes

from smriprep.workflows.surfaces import init_surface_recon_wf
wf = init_surface_recon_wf(omp_nthreads=1,
hires=True,
precomputed={})
wf = init_surface_recon_wf(
omp_nthreads=1, hires=True, precomputed={}, fs_no_resume=False,
)

See also *sMRIPrep*'s
:py:func:`~smriprep.workflows.surfaces.init_surface_recon_wf`
Expand Down Expand Up @@ -401,6 +403,7 @@ Slice time correction

from fmriprep.workflows.bold import init_bold_stc_wf
wf = init_bold_stc_wf(
mem_gb={'filesize': 1},
metadata={'RepetitionTime': 2.0,
'SliceTiming': [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]},
)
Expand Down Expand Up @@ -479,8 +482,9 @@ EPI to T1w registration
wf = init_bbreg_wf(
omp_nthreads=1,
use_bbr=True,
bold2t1w_dof=9,
bold2t1w_init='register')
bold2anat_dof=9,
bold2anat_init='t2w',
)

The alignment between the reference :abbr:`EPI (echo-planar imaging)` image
of each run and the reconstructed subject using the gray/white matter boundary
Expand Down Expand Up @@ -510,7 +514,16 @@ Resampling BOLD runs onto standard spaces
:simple_form: yes

from fmriprep.workflows.bold.apply import init_bold_volumetric_resample_wf
wf = init_bold_volumetric_resample_wf(metadata={}, fieldmap_id='fmap')
wf = init_bold_volumetric_resample_wf(
metadata={
'RepetitionTime': 2.0,
'PhaseEncodingDirection': 'j-',
'TotalReadoutTime': 0.03
},
mem_gb={'resampled': 1},
jacobian=True,
fieldmap_id='fmap',
)

This sub-workflow concatenates the transforms calculated upstream (see
`Head-motion estimation`_, `Susceptibility Distortion Correction (SDC)`_ --if
Expand Down Expand Up @@ -564,7 +577,6 @@ HCP Grayordinates

from fmriprep.workflows.bold.resampling import init_bold_fsLR_resampling_wf
wf = init_bold_fsLR_resampling_wf(
estimate_goodvoxels=True,
grayord_density='92k',
omp_nthreads=1,
mem_gb=1,
Expand Down
2 changes: 2 additions & 0 deletions fmriprep/workflows/bold/apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def init_bold_volumetric_resample_wf(
'PhaseEncodingDirection': 'j-',
'TotalReadoutTime': 0.03
},
mem_gb={'resampled': 1},
jacobian=True,
fieldmap_id='my_fieldmap',
)
Expand Down
2 changes: 1 addition & 1 deletion fmriprep/workflows/bold/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def init_bold_reg_wf(
omp_nthreads=1,
use_bbr=True,
bold2anat_dof=9,
bold2anat_init='auto')
bold2anat_init='t2w')
Parameters
----------
Expand Down
1 change: 1 addition & 0 deletions fmriprep/workflows/bold/stc.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def init_bold_stc_wf(
from fmriprep.workflows.bold import init_bold_stc_wf
wf = init_bold_stc_wf(
mem_gb={'filesize': 1},
metadata={"RepetitionTime": 2.0,
"SliceTiming": [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9]},
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ NiPreps = "https://www.nipreps.org/"
doc = [
"pydot >= 1.2.3",
"sphinx >= 5",
"sphinx-argparse",
"sphinx-argparse !=0.5.0",
"sphinx_rtd_theme>=0.5.2",
]
dev = [
Expand Down

0 comments on commit 58edc11

Please sign in to comment.