Skip to content

Commit c3a7e6b

Browse files
authored
Merge branch 'master' into dev_petprep
2 parents 6e64745 + 9e70ffb commit c3a7e6b

File tree

11 files changed

+35
-15
lines changed

11 files changed

+35
-15
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ jobs:
133133
- run:
134134
name: Setup git-annex and DataLad
135135
command: |
136-
mamba install -y git-annex=*=alldep* unzip uv
136+
mamba install -y unzip uv
137+
uv tool install git-annex
137138
uv tool install --with=datalad-next --with=datalad-osf datalad
139+
uv tool install --with=datalad-next datalad-osf
138140
git config --global user.name 'NiPreps Bot'
139141
git config --global user.email '[email protected]'
140142

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414

1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v4
17+
uses: actions/checkout@v5
1818
- name: Codespell
1919
uses: codespell-project/actions-codespell@v2

.github/workflows/docs-build-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
with:
1616
fetch-depth: 0
1717

.github/workflows/docs-build-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
1414
with:
1515
ssh-key: "${{ secrets.NIPREPS_DEPLOY }}"
1616
fetch-depth: 0

.github/workflows/tox.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
if: github.repository == 'nipreps/niworkflows'
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v4
28+
- uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
3131
- name: Set up Python 3
@@ -110,7 +110,7 @@ jobs:
110110
DEPENDS: ${{ matrix.dependencies }}
111111

112112
steps:
113-
- uses: actions/checkout@v4
113+
- uses: actions/checkout@v5
114114
with:
115115
submodules: recursive
116116
fetch-depth: 0
@@ -156,7 +156,7 @@ jobs:
156156
check: ['style', 'spellcheck']
157157

158158
steps:
159-
- uses: actions/checkout@v4
159+
- uses: actions/checkout@v5
160160
- name: Install the latest version of uv
161161
uses: astral-sh/setup-uv@v6
162162
- name: Install tox

.pre-commit-config.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ repos:
1212
- id: check-toml
1313
- id: check-added-large-files
1414
- repo: https://github.com/astral-sh/ruff-pre-commit
15-
rev: v0.7.4
15+
rev: v0.12.2
1616
hooks:
1717
- name: ruff check --fix
18-
id: ruff
18+
id: ruff-check
1919
args: [ --fix ]
2020
- name: ruff format
2121
id: ruff-format
22-
- name: fix implicit string concatenation
23-
id: ruff
24-
args: [ --select, ISC001, --fix ]

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
1.13.5 (June 19, 2025)
2+
======================
3+
Patch release in the 1.13.x series.
4+
5+
* FIX: Allow optional/None filters to be overridden (#956)
6+
17
1.13.4 (June 05, 2025)
28
======================
39
Patch release in the 1.13.x series.

niworkflows/data/nipreps.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}][_space-{space}][_cohort-{cohort}][_res-{resolution}]_label-{label}[_desc-{desc}]_{suffix<probseg>|probseg}{extension<.nii|.nii.gz|.json>|.nii.gz}",
173173
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_desc-{desc}]_{suffix<dseg>}{extension<.tsv|.json>|.tsv}",
174174
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_desc-{desc}]_{suffix<morph>}{extension<.tsv|.json>|.tsv}",
175+
"sub-{subject}[/ses-{session}]/{datatype<anat>|anat}/sub-{subject}[_ses-{session}][_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_run-{run}]_hemi-{hemi<L|R>}[_space-{space}][_cohort-{cohort}][_den-{density}]_desc-{desc}_{suffix<mask>|mask}{extension<.label.gii|.json>|.label.gii}",
175176
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_echo-{echo}][_part-{part}][_space-{space}][_cohort-{cohort}][_res-{resolution}][_desc-{desc}]_{suffix<bold|cbv|sbref|boldref|boldmap|dseg>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
176177
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_echo-{echo}][_space-{space}][_cohort-{cohort}][_res-{resolution}][_desc-{desc}]_{suffix<phase>}{extension<.nii|.nii.gz|.json>|.nii.gz}",
177178
"sub-{subject}[/ses-{session}]/{datatype<func>|func}/sub-{subject}[_ses-{session}]_task-{task}[_acq-{acquisition}][_ce-{ceagent}][_rec-{reconstruction}][_dir-{direction}][_run-{run}][_hemi-{hemi<L|R>}]_from-{from}_to-{to}_mode-{mode<image|points>|image}[_desc-{desc}]_{suffix<xfm>|xfm}{extension<.txt|.h5>}",

niworkflows/utils/bids.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,14 @@ def collect_data(
242242
...
243243
ValueError: Conflicting entities for "session" found: madeup // retest
244244
245+
>>> bids_root, _ = collect_data(
246+
... str(datadir / 'ds114'),
247+
... '01',
248+
... bids_validate=False,
249+
... session_id=None,
250+
... bids_filters={'t1w': {'session': 'retest'}})
251+
>>> bids_root['t1w'] # doctest: +ELLIPSIS
252+
['.../ds114/sub-01/ses-retest/anat/sub-01_ses-retest_T1w.nii.gz']
245253
"""
246254
if isinstance(bids_dir, BIDSLayout):
247255
layout = bids_dir
@@ -251,11 +259,12 @@ def collect_data(
251259
if not queries:
252260
queries = copy.deepcopy(DEFAULT_BIDS_QUERIES)
253261

262+
session_id = session_id or Query.OPTIONAL
254263
layout_get_kwargs = {
255264
'return_type': 'file',
256265
'subject': participant_label,
257266
'extension': ['.nii', '.nii.gz'],
258-
'session': session_id or Query.OPTIONAL,
267+
'session': session_id,
259268
}
260269

261270
reserved_entities = [('subject', participant_label), ('session', session_id)]
@@ -264,6 +273,8 @@ def collect_data(
264273
for acq, entities in bids_filters.items():
265274
# BIDS filters will not be able to override subject / session entities
266275
for entity, param in reserved_entities:
276+
if param == Query.OPTIONAL:
277+
continue
267278
if entity in entities and listify(param) != listify(entities[entity]):
268279
raise ValueError(
269280
f'Conflicting entities for "{entity}" found: {entities[entity]} // {param}'

niworkflows/viz/plots.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ def plot_carpet(
206206
if detrend:
207207
from nilearn.signal import clean
208208

209+
if tr is not None:
210+
tr = float(tr)
209211
data = clean(data.T, t_r=tr, filter=False).T
210212

211213
# We want all subplots to have the same dynamic range
@@ -1090,6 +1092,7 @@ def get_surface_meshes(density, surface_type):
10901092
vmin=mn,
10911093
vmax=mx,
10921094
axes=ax,
1095+
colorbar=False,
10931096
**hemi_kwargs,
10941097
**kwargs,
10951098
)

0 commit comments

Comments
 (0)