Skip to content

Commit e03ab6f

Browse files
authored
Merge pull request #3685 from effigies/mnt/traits
MNT: Drop traits upper bound
2 parents 4d1352a + f2e9d32 commit e03ab6f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+364
-366
lines changed

.circleci/config.yml

+1-40
Original file line numberDiff line numberDiff line change
@@ -266,43 +266,4 @@ jobs:
266266
workflows:
267267
version: 2
268268
build_test_deploy:
269-
jobs:
270-
- compare_base_dockerfiles:
271-
filters:
272-
branches:
273-
ignore:
274-
- /docs?\/.*/
275-
tags:
276-
only: /.*/
277-
- get_test_data:
278-
filters:
279-
branches:
280-
ignore:
281-
- /docs?\/.*/
282-
tags:
283-
only: /.*/
284-
- test_pytest:
285-
filters:
286-
branches:
287-
ignore:
288-
- /docs?\/.*/
289-
tags:
290-
only: /.*/
291-
requires:
292-
- compare_base_dockerfiles
293-
- get_test_data
294-
- deploy_dockerhub:
295-
filters:
296-
branches:
297-
only: master
298-
tags:
299-
only: /.*/
300-
requires:
301-
- test_pytest
302-
- update_feedstock:
303-
context: nipybot
304-
filters:
305-
branches:
306-
only: /rel\/\d.*/
307-
tags:
308-
only: /.*/
269+
jobs: []

.github/workflows/contrib.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
strategy:
3333
matrix:
3434
os: ["ubuntu-latest"]
35-
python-version: [3.8]
35+
python-version: ["3.12"]
3636
nipype-extras: ["dev"]
3737
check: ["specs", "style"]
3838
env:

.github/workflows/tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,22 @@ jobs:
9191
strategy:
9292
matrix:
9393
os: ["ubuntu-22.04"]
94-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
94+
python-version: ["3.9", "3.10", "3.11", "3.12"]
9595
check: ["test"]
9696
pip-flags: [""]
9797
depends: ["REQUIREMENTS"]
9898
deb-depends: [false]
9999
nipype-extras: ["doc,tests,profiler"]
100100
include:
101101
- os: ubuntu-22.04
102-
python-version: "3.8"
102+
python-version: "3.9"
103103
check: test
104104
pip-flags: ""
105105
depends: REQUIREMENTS
106106
deb-depends: true
107107
nipype-extras: doc,tests,profiler,duecredit,ssh
108108
- os: ubuntu-20.04
109-
python-version: 3.8
109+
python-version: "3.9"
110110
check: test
111111
pip-flags: ""
112112
depends: REQUIREMENTS

nipype/algorithms/confounds.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
InputMultiPath,
2525
OutputMultiPath,
2626
SimpleInterface,
27+
Tuple,
2728
)
2829
from ..utils.misc import normalize_mc_params
2930

@@ -64,7 +65,7 @@ class ComputeDVARSInputSpec(BaseInterfaceInputSpec):
6465
series_tr = traits.Float(desc="repetition time in sec.")
6566
save_plot = traits.Bool(False, usedefault=True, desc="write DVARS plot")
6667
figdpi = traits.Int(100, usedefault=True, desc="output dpi for the plot")
67-
figsize = traits.Tuple(
68+
figsize = Tuple(
6869
traits.Float(11.7),
6970
traits.Float(2.3),
7071
usedefault=True,
@@ -286,7 +287,7 @@ class FramewiseDisplacementInputSpec(BaseInterfaceInputSpec):
286287
save_plot = traits.Bool(False, usedefault=True, desc="write FD plot")
287288
normalize = traits.Bool(False, usedefault=True, desc="calculate FD in mm/s")
288289
figdpi = traits.Int(100, usedefault=True, desc="output dpi for the FD plot")
289-
figsize = traits.Tuple(
290+
figsize = Tuple(
290291
traits.Float(11.7),
291292
traits.Float(2.3),
292293
usedefault=True,

nipype/algorithms/mesh.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
TraitedSpec,
1515
File,
1616
BaseInterfaceInputSpec,
17+
Tuple,
1718
)
1819
from ..interfaces.vtkbase import tvtk
1920
from ..interfaces import vtkbase as VTKInfo
@@ -289,7 +290,7 @@ class MeshWarpMathsInputSpec(BaseInterfaceInputSpec):
289290
)
290291
float_trait = traits.Either(
291292
traits.Float(1.0),
292-
traits.Tuple(traits.Float(1.0), traits.Float(1.0), traits.Float(1.0)),
293+
Tuple(traits.Float(1.0), traits.Float(1.0), traits.Float(1.0)),
293294
)
294295

295296
operator = traits.Either(

nipype/algorithms/misc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
isdefined,
2424
DynamicTraitedSpec,
2525
Undefined,
26+
Tuple,
2627
)
2728
from ..utils.filemanip import fname_presuffix, split_filename, ensure_list
2829

@@ -1176,7 +1177,7 @@ def _list_outputs(self):
11761177
class SplitROIsInputSpec(TraitedSpec):
11771178
in_file = File(exists=True, mandatory=True, desc="file to be split")
11781179
in_mask = File(exists=True, desc="only process files inside mask")
1179-
roi_size = traits.Tuple(traits.Int, traits.Int, traits.Int, desc="desired ROI size")
1180+
roi_size = Tuple(traits.Int, traits.Int, traits.Int, desc="desired ROI size")
11801181

11811182

11821183
class SplitROIsOutputSpec(TraitedSpec):

nipype/info.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,13 @@ def get_nipype_gitversion():
5454
"License :: OSI Approved :: Apache Software License",
5555
"Operating System :: MacOS :: MacOS X",
5656
"Operating System :: POSIX :: Linux",
57-
"Programming Language :: Python :: 3.8",
5857
"Programming Language :: Python :: 3.9",
5958
"Programming Language :: Python :: 3.10",
6059
"Programming Language :: Python :: 3.11",
6160
"Programming Language :: Python :: 3.12",
6261
"Topic :: Scientific/Engineering",
6362
]
64-
PYTHON_REQUIRES = ">= 3.8"
63+
PYTHON_REQUIRES = ">= 3.9"
6564

6665
description = "Neuroimaging in Python: Pipelines and Interfaces"
6766

@@ -103,9 +102,9 @@ def get_nipype_gitversion():
103102
NIBABEL_MIN_VERSION = "2.1.0"
104103
NETWORKX_MIN_VERSION = "2.0"
105104
NUMPY_MIN_VERSION = "1.17"
105+
NUMPY_MAX_VERSION = "2.0"
106106
SCIPY_MIN_VERSION = "0.14"
107107
TRAITS_MIN_VERSION = "4.6"
108-
TRAITS_MAX_VERSION = "6.4"
109108
DATEUTIL_MIN_VERSION = "2.2"
110109
SIMPLEJSON_MIN_VERSION = "3.8.0"
111110
PROV_MIN_VERSION = "1.5.2"
@@ -137,15 +136,15 @@ def get_nipype_gitversion():
137136
"click>=%s" % CLICK_MIN_VERSION,
138137
"networkx>=%s" % NETWORKX_MIN_VERSION,
139138
"nibabel>=%s" % NIBABEL_MIN_VERSION,
140-
"numpy>=%s" % NUMPY_MIN_VERSION,
139+
"numpy>=%s,<%s" % (NUMPY_MIN_VERSION, NUMPY_MAX_VERSION),
141140
"packaging",
142141
"prov>=%s" % PROV_MIN_VERSION,
143142
"pydot>=%s" % PYDOT_MIN_VERSION,
144143
"python-dateutil>=%s" % DATEUTIL_MIN_VERSION,
145144
"rdflib>=%s" % RDFLIB_MIN_VERSION,
146145
"scipy>=%s" % SCIPY_MIN_VERSION,
147146
"simplejson>=%s" % SIMPLEJSON_MIN_VERSION,
148-
"traits>=%s,<%s,!=5.0" % (TRAITS_MIN_VERSION, TRAITS_MAX_VERSION),
147+
"traits>=%s,!=5.0" % TRAITS_MIN_VERSION,
149148
"filelock>=3.0.0",
150149
"etelemetry>=0.2.0",
151150
"looseversion!=1.2",

nipype/interfaces/afni/model.py

+7-12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
InputMultiPath,
2323
Undefined,
2424
Str,
25+
Tuple,
2526
)
2627
from ...external.due import BibTeX
2728

@@ -127,7 +128,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
127128
"that 'gotforit' is needed to ignore.",
128129
argstr="-allzero_OK",
129130
)
130-
dname = traits.Tuple(
131+
dname = Tuple(
131132
Str, Str, desc="set environmental variable to provided value", argstr="-D%s=%s"
132133
)
133134
mask = File(
@@ -162,7 +163,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
162163
"[default: 1]",
163164
argstr="-polort %d",
164165
)
165-
ortvec = traits.Tuple(
166+
ortvec = Tuple(
166167
File(desc="filename", exists=True),
167168
Str(desc="label"),
168169
desc="this option lets you input a rectangular array of 1 or more "
@@ -213,7 +214,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
213214
desc="number of stimulus timing files", argstr="-num_stimts %d", position=-6
214215
)
215216
stim_times = traits.List(
216-
traits.Tuple(
217+
Tuple(
217218
traits.Int(desc="k-th response model"),
218219
File(desc="stimulus timing file", exists=True),
219220
Str(desc="model"),
@@ -223,9 +224,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
223224
position=-5,
224225
)
225226
stim_label = traits.List(
226-
traits.Tuple(
227-
traits.Int(desc="k-th input stimulus"), Str(desc="stimulus label")
228-
),
227+
Tuple(traits.Int(desc="k-th input stimulus"), Str(desc="stimulus label")),
229228
desc="label for kth input stimulus (e.g., Label1)",
230229
argstr="-stim_label %d %s...",
231230
requires=["stim_times"],
@@ -251,9 +250,7 @@ class DeconvolveInputSpec(AFNICommandInputSpec):
251250
position=-2,
252251
)
253252
glt_label = traits.List(
254-
traits.Tuple(
255-
traits.Int(desc="k-th general linear test"), Str(desc="GLT label")
256-
),
253+
Tuple(traits.Int(desc="k-th general linear test"), Str(desc="GLT label")),
257254
desc="general linear test (i.e., contrast) labels",
258255
argstr="-glt_label %d %s...",
259256
requires=["gltsym"],
@@ -488,9 +485,7 @@ class RemlfitInputSpec(AFNICommandInputSpec):
488485
argstr="-nobout",
489486
)
490487
gltsym = traits.List(
491-
traits.Either(
492-
traits.Tuple(File(exists=True), Str()), traits.Tuple(Str(), Str())
493-
),
488+
traits.Either(Tuple(File(exists=True), Str()), Tuple(Str(), Str())),
494489
desc="read a symbolic GLT from input file and associate it with a "
495490
"label. As in Deconvolve, you can also use the 'SYM:' method "
496491
"to provide the definition of the GLT directly as a string "

nipype/interfaces/afni/preprocess.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
CommandLine,
1212
TraitedSpec,
1313
traits,
14+
Tuple,
1415
isdefined,
1516
File,
1617
InputMultiPath,
@@ -2439,7 +2440,7 @@ class TCorrMapInputSpec(AFNICommandInputSpec):
24392440
mask = File(exists=True, argstr="-mask %s")
24402441
automask = traits.Bool(argstr="-automask")
24412442
polort = traits.Int(argstr="-polort %d")
2442-
bandpass = traits.Tuple((traits.Float(), traits.Float()), argstr="-bpass %f %f")
2443+
bandpass = Tuple((traits.Float(), traits.Float()), argstr="-bpass %f %f")
24432444
regress_out_timeseries = File(exists=True, argstr="-ort %s")
24442445
blur_fwhm = traits.Float(argstr="-Gblur %f")
24452446
seeds_width = traits.Float(argstr="-Mseed %f", xor=("seeds"))
@@ -3011,13 +3012,13 @@ class TProjectInputSpec(AFNICommandInputSpec):
30113012
30123013
""",
30133014
)
3014-
bandpass = traits.Tuple(
3015+
bandpass = Tuple(
30153016
traits.Float,
30163017
traits.Float,
30173018
desc="""Remove all frequencies EXCEPT those in the range""",
30183019
argstr="-bandpass %g %g",
30193020
)
3020-
stopband = traits.Tuple(
3021+
stopband = Tuple(
30213022
traits.Float,
30223023
traits.Float,
30233024
desc="""Remove all frequencies in the range""",
@@ -3394,7 +3395,7 @@ class VolregInputSpec(AFNICommandInputSpec):
33943395
copyfile=False,
33953396
)
33963397
in_weight_volume = traits.Either(
3397-
traits.Tuple(File(exists=True), traits.Int),
3398+
Tuple(File(exists=True), traits.Int),
33983399
File(exists=True),
33993400
desc="weights for each voxel specified by a file with an "
34003401
"optional volume number (defaults to 0)",
@@ -3821,8 +3822,8 @@ class QwarpInputSpec(AFNICommandInputSpec):
38213822
maxlen=5,
38223823
xor=["wmask"],
38233824
)
3824-
traits.Tuple((traits.Float(), traits.Float()), argstr="-bpass %f %f")
3825-
wmask = traits.Tuple(
3825+
bandpass = Tuple((traits.Float(), traits.Float()), argstr="-bpass %f %f")
3826+
wmask = Tuple(
38263827
(File(exists=True), traits.Float()),
38273828
desc="""\
38283829
Similar to '-wball', but here, you provide a dataset 'ws'

nipype/interfaces/afni/tests/test_auto_Qwarp.py

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def test_Qwarp_inputs():
2828
argstr="-ballopt",
2929
xor=["workhard", "boxopt"],
3030
),
31+
bandpass=dict(
32+
argstr="-bpass %f %f",
33+
),
3134
base_file=dict(
3235
argstr="-base %s",
3336
copyfile=False,

nipype/interfaces/afni/tests/test_auto_QwarpPlusMinus.py

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ def test_QwarpPlusMinus_inputs():
2828
argstr="-ballopt",
2929
xor=["workhard", "boxopt"],
3030
),
31+
bandpass=dict(
32+
argstr="-bpass %f %f",
33+
),
3134
base_file=dict(
3235
argstr="-base %s",
3336
copyfile=False,

0 commit comments

Comments
 (0)