From 58edc1106dbc5f693cd83f164ed0e5227d4ba882 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Tue, 16 Jul 2024 15:55:27 -0400 Subject: [PATCH] fix(doc-build): Address errors/warnings in RTD builds (#3325) * sphinx-argparse v0.5.0 broke our builds, so blacklist: https://github.com/sphinx-doc/sphinx-argparse/issues/56 * Backport some fixes from #3312. --- docs/workflows.rst | 38 ++++++++++++++++--------- fmriprep/workflows/bold/apply.py | 2 ++ fmriprep/workflows/bold/registration.py | 2 +- fmriprep/workflows/bold/stc.py | 1 + pyproject.toml | 2 +- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/docs/workflows.rst b/docs/workflows.rst index 2f9549c99..135a5ab76 100644 --- a/docs/workflows.rst +++ b/docs/workflows.rst @@ -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, @@ -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=[], @@ -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` @@ -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]}, ) @@ -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 @@ -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 @@ -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, diff --git a/fmriprep/workflows/bold/apply.py b/fmriprep/workflows/bold/apply.py index 65d50622c..f019f13a0 100644 --- a/fmriprep/workflows/bold/apply.py +++ b/fmriprep/workflows/bold/apply.py @@ -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', ) diff --git a/fmriprep/workflows/bold/registration.py b/fmriprep/workflows/bold/registration.py index 4be31d303..3f7b5e1d6 100644 --- a/fmriprep/workflows/bold/registration.py +++ b/fmriprep/workflows/bold/registration.py @@ -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 ---------- diff --git a/fmriprep/workflows/bold/stc.py b/fmriprep/workflows/bold/stc.py index 7f024b77e..200474184 100644 --- a/fmriprep/workflows/bold/stc.py +++ b/fmriprep/workflows/bold/stc.py @@ -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]}, ) diff --git a/pyproject.toml b/pyproject.toml index e0ad8fee8..a53f2189b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [