Skip to content

Commit 615964c

Browse files
authored
Merge pull request #2533 from djarecka/default_value_2532
changing arguments names to default values for traits (closes #2532)
2 parents fde07fa + 59083d5 commit 615964c

File tree

87 files changed

+512
-295
lines changed

Some content is hidden

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

87 files changed

+512
-295
lines changed

nipype/algorithms/confounds.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,13 +390,12 @@ class CompCorInputSpec(BaseInterfaceInputSpec):
390390
desc='Detrend time series prior to component '
391391
'extraction')
392392
use_regress_poly = traits.Bool(
393-
True,
394393
deprecated='0.15.0',
395394
new_name='pre_filter',
396395
desc=('use polynomial regression '
397396
'pre-component extraction'))
398397
regress_poly_degree = traits.Range(
399-
low=1, default=1, usedefault=True, desc='the degree polynomial to use')
398+
low=1, value=1, usedefault=True, desc='the degree polynomial to use')
400399
header_prefix = traits.Str(
401400
desc=('the desired header for the output tsv '
402401
'file (one column). If undefined, will '

nipype/algorithms/mesh.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ class MeshWarpMathsInputSpec(BaseInterfaceInputSpec):
289289
float_trait,
290290
File(exists=True),
291291
default=1.0,
292+
usedefault=True,
292293
mandatory=True,
293294
desc='image, float or tuple of floats to act as operator')
294295

nipype/algorithms/rapidart.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,9 @@ class ArtifactDetectInputSpec(BaseInterfaceInputSpec):
234234
desc=("Mask threshold to be used if mask_type"
235235
" is 'thresh'."))
236236
intersect_mask = traits.Bool(
237-
True, desc=("Intersect the masks when computed from "
238-
"spm_global."))
237+
True, usedefault=True,
238+
desc=("Intersect the masks when computed from "
239+
"spm_global."))
239240
save_plot = traits.Bool(
240241
True, desc="save plots containing outliers", usedefault=True)
241242
plot_type = traits.Enum(

nipype/algorithms/tests/test_auto_ArtifactDetect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_ArtifactDetect_inputs():
1212
nohash=True,
1313
usedefault=True,
1414
),
15-
intersect_mask=dict(),
15+
intersect_mask=dict(usedefault=True, ),
1616
mask_file=dict(),
1717
mask_threshold=dict(),
1818
mask_type=dict(mandatory=True, ),

nipype/algorithms/tests/test_auto_MeshWarpMaths.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def test_MeshWarpMaths_inputs():
1313
),
1414
in_surf=dict(mandatory=True, ),
1515
operation=dict(usedefault=True, ),
16-
operator=dict(mandatory=True, ),
16+
operator=dict(
17+
mandatory=True,
18+
usedefault=True,
19+
),
1720
out_file=dict(usedefault=True, ),
1821
out_warp=dict(usedefault=True, ),
1922
)

nipype/interfaces/afni/preprocess.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,6 +1606,7 @@ class OutlierCountInputSpec(CommandLineInputSpec):
16061606
value=1e-3,
16071607
low=0.0,
16081608
high=1.0,
1609+
usedefault=True,
16091610
argstr='-qthr %.5f',
16101611
desc='indicate a value for q to compute alpha')
16111612
autoclip = traits.Bool(
@@ -1675,7 +1676,7 @@ class OutlierCount(CommandLine):
16751676
>>> toutcount = afni.OutlierCount()
16761677
>>> toutcount.inputs.in_file = 'functional.nii'
16771678
>>> toutcount.cmdline # doctest: +ELLIPSIS
1678-
'3dToutcount functional.nii'
1679+
'3dToutcount -qthr 0.00100 functional.nii'
16791680
>>> res = toutcount.run() # doctest: +SKIP
16801681
16811682
"""

nipype/interfaces/afni/tests/test_auto_Cat.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def test_Cat_inputs():
3838
argstr='> %s',
3939
mandatory=True,
4040
position=-1,
41+
usedefault=True,
4142
),
4243
out_fint=dict(
4344
argstr='-f',

nipype/interfaces/afni/tests/test_auto_NwarpApply.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ def test_NwarpApply_inputs():
2020
argstr='-source %s',
2121
mandatory=True,
2222
),
23-
interp=dict(argstr='-interp %s', ),
23+
interp=dict(
24+
argstr='-interp %s',
25+
usedefault=True,
26+
),
2427
inv_warp=dict(argstr='-iwarp', ),
2528
master=dict(argstr='-master %s', ),
2629
out_file=dict(

nipype/interfaces/afni/tests/test_auto_NwarpCat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ def test_NwarpCat_inputs():
2121
mandatory=True,
2222
position=-1,
2323
),
24-
interp=dict(argstr='-interp %s', ),
24+
interp=dict(
25+
argstr='-interp %s',
26+
usedefault=True,
27+
),
2528
inv_warp=dict(argstr='-iwarp', ),
2629
num_threads=dict(
2730
nohash=True,

nipype/interfaces/afni/tests/test_auto_OneDToolPy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def test_OneDToolPy_inputs():
3434
show_cormat_warnings=dict(
3535
argstr='-show_cormat_warnings |& tee %s',
3636
position=-1,
37-
usedefault=False,
3837
xor=['out_file'],
3938
),
4039
show_indices_interest=dict(argstr='-show_indices_interest', ),

0 commit comments

Comments
 (0)