Skip to content

Commit

Permalink
STY: ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgxd committed Feb 27, 2024
1 parent 8aa0f49 commit 5c7bd05
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion smriprep/utils/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
from pathlib import Path

from bids.layout import BIDSLayout
from niworkflows.data import load as nwf_load

from ..data import load_resource
from niworkflows.data import load as nwf_load


def collect_derivatives(derivatives_dir, subject_id, std_spaces, spec=None, patterns=None):
Expand Down
18 changes: 15 additions & 3 deletions smriprep/utils/tests/test_bids.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from niworkflows.utils.testing import generate_bids_skeleton

from . import DERIV_SKELETON
from ..bids import collect_derivatives
from . import DERIV_SKELETON


def test_collect_derivatives(tmp_path):
deriv_dir = tmp_path / 'derivatives'
Expand All @@ -13,6 +14,17 @@ def test_collect_derivatives(tmp_path):
assert len(collected['t1w_tpms']) == 3
xfms = collected['transforms']
for space in output_spaces:
assert xfms[space]['reverse'] and xfms[space]['forward']
for surface in ('white', 'pial', 'midthickness', 'sphere', 'thickness', 'sulc', 'sphere_reg', 'sphere_reg_fsLR', 'sphere_reg_msm'):
assert xfms[space]['reverse']
assert xfms[space]['forward']
for surface in (
'white',
'pial',
'midthickness',
'sphere',
'thickness',
'sulc',
'sphere_reg',
'sphere_reg_fsLR',
'sphere_reg_msm',
):
assert len(collected[surface]) == 2
2 changes: 1 addition & 1 deletion smriprep/workflows/fit/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def init_register_template_wf(
fmt_cohort = pe.Node(
niu.Function(function=_fmt_cohort, output_names=['template', 'spec']),
name='fmt_cohort',
run_without_submitting=True
run_without_submitting=True,
)

# fmt:off
Expand Down

0 comments on commit 5c7bd05

Please sign in to comment.