@@ -106,7 +106,6 @@ def bids_root(tmp_path_factory):
106106
107107def _make_params (
108108 bold2anat_init : str = 'auto' ,
109- use_bbr : bool | None = None ,
110109 dummy_scans : int | None = None ,
111110 me_output_echos : bool = False ,
112111 medial_surface_nan : bool = False ,
@@ -115,18 +114,19 @@ def _make_params(
115114 run_msmsulc : bool = True ,
116115 skull_strip_t1w : str = 'auto' ,
117116 use_syn_sdc : str | bool = False ,
118- force_syn : bool = False ,
119117 freesurfer : bool = True ,
120118 ignore : list [str ] = None ,
119+ force : list [str ] = None ,
121120 bids_filters : dict = None ,
122121):
123122 if ignore is None :
124123 ignore = []
124+ if force is None :
125+ force = []
125126 if bids_filters is None :
126127 bids_filters = {}
127128 return (
128129 bold2anat_init ,
129- use_bbr ,
130130 dummy_scans ,
131131 me_output_echos ,
132132 medial_surface_nan ,
@@ -135,9 +135,9 @@ def _make_params(
135135 run_msmsulc ,
136136 skull_strip_t1w ,
137137 use_syn_sdc ,
138- force_syn ,
139138 freesurfer ,
140139 ignore ,
140+ force ,
141141 bids_filters ,
142142 )
143143
@@ -147,7 +147,6 @@ def _make_params(
147147@pytest .mark .parametrize (
148148 (
149149 'bold2anat_init' ,
150- 'use_bbr' ,
151150 'dummy_scans' ,
152151 'me_output_echos' ,
153152 'medial_surface_nan' ,
@@ -156,21 +155,21 @@ def _make_params(
156155 'run_msmsulc' ,
157156 'skull_strip_t1w' ,
158157 'use_syn_sdc' ,
159- 'force_syn' ,
160158 'freesurfer' ,
161159 'ignore' ,
160+ 'force' ,
162161 'bids_filters' ,
163162 ),
164163 [
165164 _make_params (),
166165 _make_params (bold2anat_init = 't1w' ),
167166 _make_params (bold2anat_init = 't2w' ),
168167 _make_params (bold2anat_init = 'header' ),
169- _make_params (use_bbr = True ),
170- _make_params (use_bbr = False ),
171- _make_params (bold2anat_init = 'header' , use_bbr = True ),
168+ _make_params (force = [ 'bbr' ] ),
169+ _make_params (force = [ 'no-bbr' ] ),
170+ _make_params (bold2anat_init = 'header' , force = [ 'bbr' ] ),
172171 # Currently disabled
173- # _make_params(bold2anat_init="header", use_bbr=False ),
172+ # _make_params(bold2anat_init="header", force=['no-bbr'] ),
174173 _make_params (dummy_scans = 2 ),
175174 _make_params (me_output_echos = True ),
176175 _make_params (medial_surface_nan = True ),
@@ -180,14 +179,14 @@ def _make_params(
180179 _make_params (cifti_output = '91k' , run_msmsulc = False ),
181180 _make_params (skull_strip_t1w = 'force' ),
182181 _make_params (skull_strip_t1w = 'skip' ),
183- _make_params (use_syn_sdc = 'warn' , force_syn = True , ignore = ['fieldmaps ' ]),
182+ _make_params (use_syn_sdc = 'warn' , ignore = [ 'fieldmaps' ], force = ['syn-sdc ' ]),
184183 _make_params (freesurfer = False ),
185- _make_params (freesurfer = False , use_bbr = True ),
186- _make_params (freesurfer = False , use_bbr = False ),
184+ _make_params (freesurfer = False , force = [ 'bbr' ] ),
185+ _make_params (freesurfer = False , force = [ 'no-bbr' ] ),
187186 # Currently unsupported:
188187 # _make_params(freesurfer=False, bold2anat_init="header"),
189- # _make_params(freesurfer=False, bold2anat_init="header", use_bbr=True ),
190- # _make_params(freesurfer=False, bold2anat_init="header", use_bbr=False ),
188+ # _make_params(freesurfer=False, bold2anat_init="header", force=['bbr'] ),
189+ # _make_params(freesurfer=False, bold2anat_init="header", force=['no-bbr'] ),
191190 # Regression test for gh-3154:
192191 _make_params (bids_filters = {'sbref' : {'suffix' : 'sbref' }}),
193192 ],
@@ -198,7 +197,6 @@ def test_init_fmriprep_wf(
198197 level : str ,
199198 anat_only : bool ,
200199 bold2anat_init : str ,
201- use_bbr : bool | None ,
202200 dummy_scans : int | None ,
203201 me_output_echos : bool ,
204202 medial_surface_nan : bool ,
@@ -207,16 +205,15 @@ def test_init_fmriprep_wf(
207205 run_msmsulc : bool ,
208206 skull_strip_t1w : str ,
209207 use_syn_sdc : str | bool ,
210- force_syn : bool ,
211208 freesurfer : bool ,
212209 ignore : list [str ],
210+ force : list [str ],
213211 bids_filters : dict ,
214212):
215213 with mock_config (bids_dir = bids_root ):
216214 config .workflow .level = level
217215 config .workflow .anat_only = anat_only
218216 config .workflow .bold2anat_init = bold2anat_init
219- config .workflow .use_bbr = use_bbr
220217 config .workflow .dummy_scans = dummy_scans
221218 config .execution .me_output_echos = me_output_echos
222219 config .workflow .medial_surface_nan = medial_surface_nan
@@ -226,6 +223,7 @@ def test_init_fmriprep_wf(
226223 config .workflow .cifti_output = cifti_output
227224 config .workflow .run_reconall = freesurfer
228225 config .workflow .ignore = ignore
226+ config .workflow .force = force
229227 with patch .dict ('fmriprep.config.execution.bids_filters' , bids_filters ):
230228 wf = init_fmriprep_wf ()
231229
0 commit comments