Skip to content

Commit f469797

Browse files
authored
chore: Enable 3.13 tests (#909)
* fix: Drop deprecated TraitDictAnys * chore: Enable 3.13 tests * chore(ci): Install tox-uv for consistency
1 parent 8b6bd82 commit f469797

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

.github/workflows/tox.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
runs-on: ubuntu-latest
9595
strategy:
9696
matrix:
97-
python-version: ["3.9", "3.10", "3.11", "3.12"] #, "3.13"]
97+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9898
dependencies: [latest, pre]
9999
include:
100100
- python-version: "3.9"
@@ -168,9 +168,11 @@ jobs:
168168
- uses: actions/checkout@v4
169169
- name: Install the latest version of uv
170170
uses: astral-sh/setup-uv@v4
171+
- name: Install tox
172+
run: uv tool install tox --with=tox-uv
171173
- name: Show tox config
172-
run: uvx tox c
174+
run: tox c
173175
- name: Show tox config (this call)
174-
run: uvx tox c -e ${{ matrix.check }}
176+
run: tox c -e ${{ matrix.check }}
175177
- name: Run check
176-
run: uvx tox -e ${{ matrix.check }}
178+
run: tox -e ${{ matrix.check }}

niworkflows/interfaces/bids.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,15 @@ class _PrepareDerivativeInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
312312
desc='a list entities that will not be propagated from the source file',
313313
)
314314
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
315-
meta_dict = traits.DictStrAny(desc='an input dictionary containing metadata')
315+
meta_dict = traits.Dict(Str, desc='an input dictionary containing metadata')
316316
source_file = InputMultiObject(
317317
File(exists=False), mandatory=True, desc='the source file(s) to extract entities from'
318318
)
319319

320320

321321
class _PrepareDerivativeOutputSpec(TraitedSpec):
322322
out_file = OutputMultiObject(File(exists=True), desc='derivative file path')
323-
out_meta = traits.DictStrAny(desc='derivative metadata')
323+
out_meta = traits.Dict(Str, desc='derivative metadata')
324324
out_path = OutputMultiObject(Str, desc='relative path in target directory')
325325
fixed_hdr = traits.List(traits.Bool, desc='whether derivative header was fixed')
326326

@@ -733,7 +733,7 @@ class _SaveDerivativeInputSpec(TraitedSpec):
733733
exists=True, mandatory=True, desc='Path to the base directory for storing data.'
734734
)
735735
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
736-
metadata = traits.DictStrAny(desc='metadata to be saved alongside the file')
736+
metadata = traits.Dict(Str, desc='metadata to be saved alongside the file')
737737
relative_path = InputMultiObject(
738738
traits.Str, desc='path to the file relative to the base directory'
739739
)
@@ -802,7 +802,7 @@ class _DerivativesDataSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
802802
desc='a list entities that will not be propagated from the source file',
803803
)
804804
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
805-
meta_dict = traits.DictStrAny(desc='an input dictionary containing metadata')
805+
meta_dict = traits.Dict(Str, desc='an input dictionary containing metadata')
806806
source_file = InputMultiObject(
807807
File(exists=False), mandatory=True, desc='the source file(s) to extract entities from'
808808
)

niworkflows/interfaces/norm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
BaseInterface,
3333
BaseInterfaceInputSpec,
3434
File,
35+
Str,
3536
isdefined,
3637
traits,
3738
)
@@ -100,7 +101,7 @@ class _SpatialNormalizationInputSpec(BaseInterfaceInputSpec):
100101
# Load other settings from file.
101102
settings = traits.List(File(exists=True), desc='pass on the list of settings files')
102103
# Resolution of the default template.
103-
template_spec = traits.DictStrAny(desc='template specifications')
104+
template_spec = traits.Dict(Str, desc='template specifications')
104105
template_resolution = traits.Enum(1, 2, None, desc='(DEPRECATED) template resolution')
105106
# Use explicit masking?
106107
explicit_masking = traits.Bool(

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
requires =
33
tox>=4
44
envlist =
5-
py3{9,10,11,12}-latest
5+
py3{9,10,11,12,13}-latest
66
py39-min
7-
py3{10,11,12}-pre
7+
py3{10,11,12,13}-pre
88
skip_missing_interpreters = true
99

1010
# Configuration that allows us to split tests across GitHub runners effectively

0 commit comments

Comments
 (0)