Skip to content

Commit b266633

Browse files
committed
Merge tag '25.2.0'
25.2.0 (September 25, 2025) The first release of the 25.2.x series. This release synchronizes with downstream dependencies, as well as leverages TemplateFlow to retrieve intermediate transforms used during multi-step registration. If you are reusing a previous TemplateFlow cache (which may be the case if running with Apptainer / Singularity), you will need to clear or update your cache to ensure these new files are available. Thanks to @LuciMoore for the contribution! Documentation * DOC: MCRIBS and surf recon methods chosen based on age (#485) Enhancements * ENH: Retrieve transforms with templateflow (#486) * ENH: Save cortex mask (#487) * ENH: Add multiverse output layout (#481) Bug Fixes * FIX: Default to grid-constant when resampling BOLD to output spaces * FIX: Propagate error code if pipeline run is unsuccessful
2 parents 3b88bd4 + 559f03b commit b266633

File tree

7 files changed

+66
-26
lines changed

7 files changed

+66
-26
lines changed

CHANGES.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
25.2.0 (September 25, 2025)
2+
===========================
3+
The first release of the 25.2.x series.
4+
5+
This release synchronizes with downstream dependencies, as well as
6+
leverages TemplateFlow to retrieve intermediate transforms used during multi-step registration.
7+
8+
If you are reusing a previous TemplateFlow cache (which may be the case if running with
9+
Apptainer / Singularity), you will need to clear or update your cache to ensure these new files
10+
are available.
11+
12+
Thanks to @LuciMoore for the contribution!
13+
14+
### Documentation
15+
* DOC: MCRIBS and surf recon methods chosen based on age (#485)
16+
17+
### Enhancements
18+
* ENH: Retrieve transforms with templateflow (#486)
19+
* ENH: Save cortex mask (#487)
20+
* ENH: Add multiverse output layout (#481)
21+
22+
### Bug Fixes
23+
* FIX: Default to grid-constant when resampling BOLD to output spaces
24+
* FIX: Propagate error code if pipeline run is unsuccessful
25+
126
25.1.2 (August 28, 2025)
227
========================
328
A patch release in the 25.1.x series.

nibabies/cli/run.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def main():
104104
nibabies_wf.run(**_plugin)
105105
except Exception as e:
106106
config.loggers.workflow.critical('nibabies failed: %s', e)
107+
exitcode = 1
107108
raise
108109
else:
109110
config.loggers.workflow.log(25, 'nibabies finished successfully!')
@@ -147,7 +148,7 @@ def main():
147148
add_hash = config.execution.output_layout == 'multiverse'
148149

149150
# Generate reports phase
150-
generate_reports(
151+
failed_reports = generate_reports(
151152
config.execution.unique_labels,
152153
config.execution.nibabies_dir,
153154
config.execution.run_uuid,
@@ -161,6 +162,16 @@ def main():
161162
)
162163
write_bidsignore(config.execution.nibabies_dir)
163164

165+
if failed_reports:
166+
msg = (
167+
'Report generation was not successful for the following participants '
168+
f': {", ".join(failed_reports)}.'
169+
)
170+
config.loggers.cli.error(msg)
171+
172+
if int(exitcode) or failed_reports:
173+
sys.exit(1)
174+
164175

165176
if __name__ == '__main__':
166177
raise RuntimeError(

nibabies/interfaces/resampling.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,15 @@ class ResampleSeriesInputSpec(TraitedSpec):
6262
num_threads = traits.Int(1, usedefault=True, desc='Number of threads to use for resampling')
6363
output_data_type = traits.Str('float32', usedefault=True, desc='Data type of output image')
6464
order = traits.Int(3, usedefault=True, desc='Order of interpolation (0=nearest, 3=cubic)')
65-
mode = traits.Str(
65+
mode = traits.Enum(
66+
'grid-constant',
67+
'nearest',
6668
'constant',
69+
'mirror',
70+
'reflect',
71+
'wrap',
72+
'grid-mirror',
73+
'grid-wrap',
6774
usedefault=True,
6875
desc='How data is extended beyond its boundaries. '
6976
'See scipy.ndimage.map_coordinates for more details.',
@@ -561,7 +568,7 @@ def resample_image(
561568
hmc = []
562569

563570
# Retrieve the RAS coordinates of the target space
564-
coordinates = nt.base.SpatialReference.factory(target).ndcoords.astype('f4').T
571+
coordinates = nt.base.SpatialReference.factory(target).ndcoords.astype('f4')
565572

566573
# We will operate in voxel space, so get the source affine
567574
vox2ras = source.affine

nibabies/utils/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def load_transforms(xfm_paths: list[Path], inverse: list[bool]) -> nt.base.Trans
2020
path = Path(path)
2121
if path.suffix == '.h5':
2222
# Load as a TransformChain
23-
xfm = nt.manip.load(path)
23+
xfm = nt.manip.load(path, fmt='h5')
2424
else:
2525
xfm = nt.linear.load(path)
2626
if inv:

nibabies/utils/viz.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,12 @@ def plot_carpet(
211211
legend = False
212212

213213
else: # Volumetric NIfTI
214-
from nilearn._utils import check_niimg_4d
215214
from nilearn._utils.niimg import _safe_get_data
215+
from nilearn._utils.niimg_conversions import check_niimg
216216

217-
img_nii = check_niimg_4d(
217+
img_nii = check_niimg(
218218
img,
219+
ensure_ndim=4,
219220
dtype='auto',
220221
)
221222
func_data = _safe_get_data(img_nii, ensure_finite=True)

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ license = {file = "LICENSE"}
2020
requires-python = ">=3.10"
2121
dependencies = [
2222
"acres",
23-
"nibabel >= 5.0.0",
24-
"nipype >= 1.8.5",
25-
"nireports >= 23.2.0",
23+
"nibabel >= 5.1.0",
24+
"nipype >= 1.9.0",
25+
"nireports >= 25.3.0",
2626
"nitime",
27-
"nitransforms >= 24.1.1",
27+
"nitransforms >= 25.0.1",
2828
"niworkflows >= 1.14.1",
29-
"numpy >= 1.21.0",
29+
"numpy >= 2.0",
3030
"packaging",
3131
"pandas < 3",
3232
"psutil >= 5.4",
3333
"pybids >= 0.15.0",
3434
"requests",
35-
"sdcflows >= 2.13.0",
35+
"sdcflows >= 2.14.0",
3636
"smriprep >= 0.19.1",
3737
"tedana >= 23.0.2",
38-
"templateflow >= 24.2.0",
38+
"templateflow >= 25.0.3",
3939
"toml",
4040
"typing_extensions; python_version<'3.11'",
4141
]

requirements.txt

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,18 +204,20 @@ nipype==1.10.0
204204
# niworkflows
205205
# sdcflows
206206
# smriprep
207-
nireports==25.2.0
207+
nireports==25.3.0
208208
# via
209209
# nibabies (pyproject.toml)
210210
# sdcflows
211+
# smriprep
211212
nitime==0.11
212213
# via nibabies (pyproject.toml)
213-
nitransforms==24.1.2
214+
nitransforms==25.0.1
214215
# via
215216
# nibabies (pyproject.toml)
216217
# niworkflows
217218
# sdcflows
218-
niworkflows==1.13.4
219+
# smriprep
220+
niworkflows==1.14.1
219221
# via
220222
# nibabies (pyproject.toml)
221223
# sdcflows
@@ -265,7 +267,6 @@ packaging==25.0
265267
# nilearn
266268
# nipype
267269
# niworkflows
268-
# pooch
269270
# scikit-image
270271
# smriprep
271272
pandas==2.2.3
@@ -289,11 +290,7 @@ pillow==11.2.1
289290
# matplotlib
290291
# scikit-image
291292
platformdirs==4.3.8
292-
# via
293-
# datalad
294-
# pooch
295-
pooch==1.8.2
296-
# via nibabies (pyproject.toml)
293+
# via datalad
297294
prov==2.0.2
298295
# via nipype
299296
psutil==7.0.0
@@ -351,7 +348,6 @@ requests==2.32.4
351348
# etelemetry
352349
# nilearn
353350
# osfclient
354-
# pooch
355351
# python-gitlab
356352
# requests-toolbelt
357353
# templateflow
@@ -386,7 +382,7 @@ scipy==1.15.2
386382
# scikit-learn
387383
# sdcflows
388384
# tedana
389-
sdcflows==2.13.1
385+
sdcflows==2.14.0
390386
# via nibabies (pyproject.toml)
391387
seaborn==0.13.2
392388
# via
@@ -402,15 +398,15 @@ six==1.17.0
402398
# osfclient
403399
# pybtex
404400
# python-dateutil
405-
smriprep==0.18.0
401+
smriprep==0.19.1
406402
# via nibabies (pyproject.toml)
407403
sqlalchemy==2.0.41
408404
# via pybids
409405
svgutils==0.3.4
410406
# via niworkflows
411407
tedana==25.0.1
412408
# via nibabies (pyproject.toml)
413-
templateflow==24.2.2
409+
templateflow==25.0.3
414410
# via
415411
# nibabies (pyproject.toml)
416412
# nireports

0 commit comments

Comments
 (0)