Skip to content

Afni verbosity #2345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nipype/interfaces/afni/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,12 @@ class AllineateInputSpec(AFNICommandInputSpec):
traits.Enum(*_dirs),
argstr='-nwarp_fixdep%s',
desc='To fix non-linear warp dependency along directions.')
verbose = traits.Bool(
argstr='-verb',
desc='Print out verbose progress reports.')
quiet = traits.Bool(
argstr='-quiet',
desc="Don't print out verbose progress reports.")


class AllineateOutputSpec(TraitedSpec):
Expand Down
4 changes: 4 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_Allineate.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ def test_Allineate_inputs():
outputtype=dict(),
overwrite=dict(argstr='-overwrite',
),
quiet=dict(argstr='-quiet',
),
reference=dict(argstr='-base %s',
),
replacebase=dict(argstr='-replacebase',
Expand All @@ -118,6 +120,8 @@ def test_Allineate_inputs():
),
usetemp=dict(argstr='-usetemp',
),
verbose=dict(argstr='-verb',
),
warp_type=dict(argstr='-warp %s',
),
warpfreeze=dict(argstr='-warpfreeze',
Expand Down
2 changes: 2 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_Copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ def test_Copy_inputs():
terminal_output=dict(deprecated='1.0.0',
nohash=True,
),
verbose=dict(argstr='-verb',
),
)
inputs = Copy.input_spec()

Expand Down
2 changes: 2 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_MaskTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def test_MaskTool_inputs():
),
union=dict(argstr='-union',
),
verbose=dict(argstr='-verb %s',
),
)
inputs = MaskTool.input_spec()

Expand Down
2 changes: 2 additions & 0 deletions nipype/interfaces/afni/tests/test_auto_TCat.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def test_TCat_inputs():
terminal_output=dict(deprecated='1.0.0',
nohash=True,
),
verbose=dict(argstr='-verb',
),
)
inputs = TCat.input_spec()

Expand Down
9 changes: 9 additions & 0 deletions nipype/interfaces/afni/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,9 @@ class CopyInputSpec(AFNICommandInputSpec):
argstr='%s',
position=-1,
name_source='in_file')
verbose = traits.Bool(
desc='print progress reports',
argstr='-verb')


class Copy(AFNICommand):
Expand Down Expand Up @@ -1377,6 +1380,9 @@ class MaskToolInputSpec(AFNICommandInputSpec):
'or using the labels in {R,L,A,P,I,S}.',
argstr='-fill_dirs %s',
requires=['fill_holes'])
verbose = traits.Int(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that you have verbose in Copy. If it's okay to mix-and-match (i.e., there are some interfaces that already have verbose), I'd prefer that you use verbose for all new additions. If this would be the first interface with verbose, I'd say switch it to verb for consistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I am not sure to follow. I added verbose to Allineate, Copy, MaskTool andTcat. These interfaces had no verbosity parameter before. I didn't touch the other ones which had already a verb or a verbose parameter as you told me.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I think I wrote this just as you made those changes. I wasn't sure if you were going to keep it at verb, but the changes you made look good. You can safely ignore that last message. (Also this one.)

desc='specify verbosity level, for 0 to 3',
argstr='-verb %s')


class MaskToolOutputSpec(TraitedSpec):
Expand Down Expand Up @@ -1985,6 +1991,9 @@ class TCatInputSpec(AFNICommandInputSpec):
'dataset mean back in. Option -rlt++ adds overall mean of all '
'dataset timeseries back in.',
position=1)
verbose = traits.Bool(
desc='Print out some verbose output as the program',
argstr='-verb')


class TCat(AFNICommand):
Expand Down