Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .maint/update_authors.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def _namelast(inlist):
@click.group()
def cli():
"""Generate authorship boilerplates."""
pass


@cli.command()
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
- id: fix-byte-order-marker
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.15
rev: v0.16.1
hooks:
- id: ruff
args: [ --fix ]
Expand Down
8 changes: 4 additions & 4 deletions sdcflows/utils/tests/test_wrangler.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ def test_fieldmapless(tmp_path):
},
}
me_metadata = [{'EchoTime': 0.01 * i, **bold['metadata']} for i in range(1, 4)]
sbref = {**bold, **{'suffix': 'sbref'}}
sbref = {**bold, 'suffix': 'sbref'}
spec = {
'01': {
'anat': [T1w],
Expand Down Expand Up @@ -561,7 +561,7 @@ def test_fieldmapless(tmp_path):
spec = {
'01': {
'anat': [T1w],
'func': [{'echo': i + 1, **bold, **{'metadata': me_metadata[i]}} for i in range(3)],
'func': [{'echo': i + 1, **bold, 'metadata': me_metadata[i]} for i in range(3)],
},
}
generate_bids_skeleton(bids_dir, spec)
Expand Down Expand Up @@ -606,8 +606,8 @@ def test_fieldmapless(tmp_path):
spec = {
'01': {
'anat': [T1w],
'func': [{'echo': i + 1, **bold, **{'metadata': me_metadata[i]}} for i in range(3)]
+ [{'echo': i + 1, **sbref, **{'metadata': me_metadata[i]}} for i in range(3)],
'func': [{'echo': i + 1, **bold, 'metadata': me_metadata[i]} for i in range(3)]
+ [{'echo': i + 1, **sbref, 'metadata': me_metadata[i]} for i in range(3)],
},
}
generate_bids_skeleton(bids_dir, spec)
Expand Down
15 changes: 10 additions & 5 deletions sdcflows/utils/wrangler.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,8 @@ def find_estimators(
for fmap in layout.get(
**{
**base_entities,
**{'suffix': ['fieldmap', 'phasediff', 'phase1'], 'session': sessions},
'suffix': ['fieldmap', 'phasediff', 'phase1'],
'session': sessions,
}
):
try:
Expand Down Expand Up @@ -425,7 +426,7 @@ def find_estimators(
dirs = layout.get_directions(**entities)
if len(dirs) > 1:
by_intent = {}
for fmap in layout.get(**{**entities, **{'direction': dirs}}):
for fmap in layout.get(**{**entities, 'direction': dirs}):
fmapfile = fm.FieldmapFile(
fmap.path,
metadata=_filter_metadata(fmap.get_metadata(), subject),
Expand All @@ -451,7 +452,9 @@ def find_estimators(
has_intended = layout.get(
**{
**base_entities,
**{'suffix': 'epi', 'IntendedFor': Query.REQUIRED, 'session': sessions},
'suffix': 'epi',
'IntendedFor': Query.REQUIRED,
'session': sessions,
}
)

Expand Down Expand Up @@ -515,7 +518,7 @@ def find_estimators(
fmapless = False

# Find fieldmap-less schemes
anat_file = layout.get(**{**base_entities, **{'suffix': anat_suffix, 'session': sessions}})
anat_file = layout.get(**{**base_entities, 'suffix': anat_suffix, 'session': sessions})

if not fmapless or not anat_file:
logger.debug('Skipping fmap-less estimation')
Expand Down Expand Up @@ -590,7 +593,9 @@ def find_anatomical_estimators(
candidates = layout.get(
**{
**base_entities,
**{'suffix': suffixes, 'session': ses, 'datatype': datatype},
'suffix': suffixes,
'session': ses,
'datatype': datatype,
}
)

Expand Down
Loading