Skip to content

Nipypeclick #11

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 9 commits into from
Oct 7, 2016
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
2 changes: 1 addition & 1 deletion doc/_templates/indexsidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3>{{ _('Links') }}</h3>
<li>Code: <a href="http://github.com/nipy/nipype">Github</a> · <a href="http://github.com/nipy/nipype/issues">Bugs-Requests</a></li>
<li>Forum: <a href="http://neurostars.org/t/nipype">User</a> · <a href="http://projects.scipy.org/mailman/listinfo/nipy-devel">Developer</a></li>
<li><a href="about.html#funding">Funding</a> · <a href="http://nipy.org/software/license/index.html"><img src="https://img.shields.io/pypi/l/nipype.svg" alt="License"></a></li>
<li><a href="https://travis-ci.org/nipy/nipype"><img src="https://travis-ci.org/nipy/nipype.png?branch=master" alt="travis"></a> · <a href='https://coveralls.io/r/nipy/nipype'><img src='https://coveralls.io/repos/nipy/nipype/badge.png' alt='Coverage Status' /></a></li>
<li><a href="https://travis-ci.org/nipy/nipype"><img src="https://travis-ci.org/nipy/nipype.png?branch=master" alt="travis"></a> · <a href='https://codecov.io/gh/nipy/nipype'><img src='https://codecov.io/gh/nipy/nipype/branch/master/graph/badge.svg' alt='Coverage Status' /></a></li>
<a href='https://pypi.python.org/pypi/nipype/'><img src='https://img.shields.io/pypi/pyversions/nipype.svg' alt='Python Versions' /></a></li>
</ul>

Expand Down
3 changes: 2 additions & 1 deletion nipype/algorithms/tests/test_auto_FramewiseDisplacement.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ def test_FramewiseDisplacement_inputs():
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_plots=dict(),
in_plots=dict(mandatory=True,
),
normalize=dict(usedefault=True,
),
out_figure=dict(usedefault=True,
Expand Down
2 changes: 1 addition & 1 deletion nipype/algorithms/tests/test_auto_TSNR.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ...testing import assert_equal
from ..misc import TSNR
from ..confounds import TSNR


def test_TSNR_inputs():
Expand Down
14 changes: 12 additions & 2 deletions nipype/interfaces/afni/preprocess.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft = python sts = 4 ts = 4 sw = 4 et:
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Afni preprocessing interfaces

Change directory to provide relative paths for doctests
Expand Down Expand Up @@ -2384,7 +2384,9 @@ class RetroicorInputSpec(AFNICommandInputSpec):
mandatory=True,
exists=True,
copyfile=False)
out_file = File(desc='output image file name', argstr='-prefix %s', mandatory=True, position=1)
out_file = File(name_template='%s_retroicor', name_source=['in_file'],
desc='output image file name',
argstr='-prefix %s', position=1)
card = File(desc='1D cardiac data file for cardiac correction',
argstr='-card %s',
position=-2,
Expand Down Expand Up @@ -2438,6 +2440,7 @@ class Retroicor(AFNICommand):
>>> ret.inputs.in_file = 'functional.nii'
>>> ret.inputs.card = 'mask.1D'
>>> ret.inputs.resp = 'resp.1D'
>>> ret.inputs.outputtype = 'NIFTI'
>>> res = ret.run() # doctest: +SKIP
"""

Expand All @@ -2446,6 +2449,13 @@ class Retroicor(AFNICommand):
output_spec = AFNICommandOutputSpec


def _format_arg(self, name, trait_spec, value):
if name == 'in_file':
if not isdefined(self.inputs.card) and not isdefined(self.inputs.resp):
return None
return super(Retroicor, self)._format_arg(name, trait_spec, value)


class AFNItoNIFTIInputSpec(AFNICommandInputSpec):
in_file = File(desc='input file to 3dAFNItoNIFTI',
argstr='%s',
Expand Down
3 changes: 2 additions & 1 deletion nipype/interfaces/afni/tests/test_auto_Retroicor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def test_Retroicor_inputs():
position=-5,
),
out_file=dict(argstr='-prefix %s',
mandatory=True,
name_source=[u'in_file'],
name_template='%s_retroicor',
position=1,
),
outputtype=dict(),
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ def main():
tests_require=ldict['TESTS_REQUIRES'],
test_suite='nose.collector',
zip_safe=False,
extras_require=ldict['EXTRA_REQUIRES']
extras_require=ldict['EXTRA_REQUIRES'],
entry_points='''
[console_scripts]
nipypecli=nipype.scripts.cli:cli
'''
)

if __name__ == "__main__":
Expand Down