Skip to content

Commit 28bf2cc

Browse files
authored
Apply miscellaneous refactors (#1576)
1 parent 5292d63 commit 28bf2cc

File tree

7 files changed

+603
-339
lines changed

7 files changed

+603
-339
lines changed

xcp_d/interfaces/concatenation.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,13 @@ def _run_interface(self, runtime):
227227
if len(successful_runs) < n_runs:
228228
LOGGER.warning(f'Of {n_runs} runs, only runs {successful_runs} were successful.')
229229

230+
if not successful_runs:
231+
LOGGER.warning('No successful runs found. Returning empty outputs.')
232+
self._results['denoised_bold'] = []
233+
for input_name in inputs_to_filter:
234+
self._results[input_name] = []
235+
return runtime
236+
230237
self._results['denoised_bold'] = [denoised_bold[i] for i in successful_runs]
231238

232239
for input_name, input_list in inputs_to_filter.items():

xcp_d/tests/test_utils_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def test_get_bold2std_and_t1w_xfms(ds001419_data):
471471
)
472472

473473
tofail_to_anat_xfm = nlin6asym_to_anat_xfm.replace('from-MNI152NLin6Asym_', 'from-tofail_')
474-
with pytest.raises(ValueError, match='Space "tofail"'):
474+
with pytest.raises(ValueError, match='BOLD space "tofail" not supported'):
475475
utils.get_bold2std_and_t1w_xfms(
476476
bold_file_tofail,
477477
tofail_to_anat_xfm,

0 commit comments

Comments
 (0)