Skip to content

Commit

Permalink
chore: Enable 3.13 tests (#909)
Browse files Browse the repository at this point in the history
* fix: Drop deprecated TraitDictAnys

* chore: Enable 3.13 tests

* chore(ci): Install tox-uv for consistency
  • Loading branch information
effigies authored Dec 5, 2024
1 parent 8b6bd82 commit f469797
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"] #, "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
dependencies: [latest, pre]
include:
- python-version: "3.9"
Expand Down Expand Up @@ -168,9 +168,11 @@ jobs:
- uses: actions/checkout@v4
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v4
- name: Install tox
run: uv tool install tox --with=tox-uv
- name: Show tox config
run: uvx tox c
run: tox c
- name: Show tox config (this call)
run: uvx tox c -e ${{ matrix.check }}
run: tox c -e ${{ matrix.check }}
- name: Run check
run: uvx tox -e ${{ matrix.check }}
run: tox -e ${{ matrix.check }}
8 changes: 4 additions & 4 deletions niworkflows/interfaces/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,15 +312,15 @@ class _PrepareDerivativeInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
desc='a list entities that will not be propagated from the source file',
)
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
meta_dict = traits.DictStrAny(desc='an input dictionary containing metadata')
meta_dict = traits.Dict(Str, desc='an input dictionary containing metadata')
source_file = InputMultiObject(
File(exists=False), mandatory=True, desc='the source file(s) to extract entities from'
)


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

Expand Down Expand Up @@ -733,7 +733,7 @@ class _SaveDerivativeInputSpec(TraitedSpec):
exists=True, mandatory=True, desc='Path to the base directory for storing data.'
)
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
metadata = traits.DictStrAny(desc='metadata to be saved alongside the file')
metadata = traits.Dict(Str, desc='metadata to be saved alongside the file')
relative_path = InputMultiObject(
traits.Str, desc='path to the file relative to the base directory'
)
Expand Down Expand Up @@ -802,7 +802,7 @@ class _DerivativesDataSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec):
desc='a list entities that will not be propagated from the source file',
)
in_file = InputMultiObject(File(exists=True), mandatory=True, desc='the object to be saved')
meta_dict = traits.DictStrAny(desc='an input dictionary containing metadata')
meta_dict = traits.Dict(Str, desc='an input dictionary containing metadata')
source_file = InputMultiObject(
File(exists=False), mandatory=True, desc='the source file(s) to extract entities from'
)
Expand Down
3 changes: 2 additions & 1 deletion niworkflows/interfaces/norm.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
BaseInterface,
BaseInterfaceInputSpec,
File,
Str,
isdefined,
traits,
)
Expand Down Expand Up @@ -100,7 +101,7 @@ class _SpatialNormalizationInputSpec(BaseInterfaceInputSpec):
# Load other settings from file.
settings = traits.List(File(exists=True), desc='pass on the list of settings files')
# Resolution of the default template.
template_spec = traits.DictStrAny(desc='template specifications')
template_spec = traits.Dict(Str, desc='template specifications')
template_resolution = traits.Enum(1, 2, None, desc='(DEPRECATED) template resolution')
# Use explicit masking?
explicit_masking = traits.Bool(
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
requires =
tox>=4
envlist =
py3{9,10,11,12}-latest
py3{9,10,11,12,13}-latest
py39-min
py3{10,11,12}-pre
py3{10,11,12,13}-pre
skip_missing_interpreters = true

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

0 comments on commit f469797

Please sign in to comment.