Skip to content

Commit

Permalink
FIX: Address the problems of a sloppy merge
Browse files Browse the repository at this point in the history
I precipitated the merge of #2461 without observing two issues:

- The bold workflow is provided with a list (not a str) with ME-EPI
- Test data (ds054) for CircleCI has only 5 timepoints, which triggered
  workflow skipping.

Both problems are addressed in this PR.

Continues: #2461.
  • Loading branch information
oesteban committed Jul 20, 2021
1 parent 98057c8 commit d44e9e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fmriprep/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,11 @@ def init_func_preproc_wf(bold_file):
from niworkflows.interfaces.utils import DictMerge
from sdcflows.workflows.base import init_sdc_estimate_wf, fieldmap_wrangler

if nb.load(bold_file).shape[3:] <= (5,):
if nb.load(
bold_file[0] if isinstance(bold_file, (list, tuple)) else bold_file
).shape[3:] <= (5 - config.execution.sloppy,):
config.loggers.workflow.warning(
f"Too short BOLD series (<= 5 timepoints). Skipping processing of <{ref_file}>."
f"Too short BOLD series (<= 5 timepoints). Skipping processing of <{bold_file}>."
)
return

Expand Down

0 comments on commit d44e9e6

Please sign in to comment.