Skip to content

Conversation

@ssikka
Copy link
Contributor

@ssikka ssikka commented Sep 26, 2011

Hi All,
I have added a bunch of afni interfaces to the preprocess.py file in nipype/interfaces/afni/preprocess.py.

Please review !

Cheers!
Sharad

Copy link
Member

Choose a reason for hiding this comment

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

Leftover unresolved conflict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure what made it look this way -

However the interface for ThreedAllineate should look like this:-

class ThreedAllineateInputSpec(AFNITraitedSpec):
infile = File(desc = 'input file to 3dAllineate',
argstr = '-source %s',
position = -1,
mandatory = True,
exists = True)
outfile = File(desc = 'output file from 3dAllineate',
argstr = '-prefix %s',
position = -2,
mandatory = True)
matrix = File(desc = 'matrix to align input file',
argstr = '-1dmatrix_apply %s',
position = -3)

class ThreedAllineateOutputSpec(AFNITraitedSpec):
out_file = File(desc = 'cut file',
exists = True)

class ThreedAllineate(AFNICommand):

_cmd = '3dAllineate' input_spec = ThreedAllineateInputSpec output_spec = ThreedAllineateOutputSpec def _list_outputs(self): outputs = self.output_spec().get() outputs['out_file'] = self.inputs.outfile return outputs 
Copy link
Member

Choose a reason for hiding this comment

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

If you commit those changes and push it to github, they will be automatically included in this pull request. How cool is that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is very cool. Made the requested edits , created a patch and submitted.

Thanks for the quick responses!
Cheers!
Sharad

On Mon, Sep 26, 2011 at 9:01 AM, Chris Filo Gorgolewski <
reply@reply.github.com>wrote:

 For complete details, see the `3dAllineate Documentation. < 

http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dAllineate.html>`_
"""
+>>>>>>> 2d53ac8

If you commit those changes and push it to github, they will be
automatically included in this pull request. How cool is that?

Reply to this email directly or view it on GitHub:
https://github.com/nipy/nipype/pull/238/files#r140110

@satra
Copy link
Member

satra commented Sep 27, 2011

since i'm going to start requesting that people clean up code before we merge and hopefully do so in a distributed manner, here are some new guidelines. we are not there yet with consistency (i still need to do what i'm asking), but i hope to clean up stylistic and base-class test coverage + automated api test coverage soon.

this is more of a note to all (including myself)!

  • install pep8 (pip install pep8 will do just fine)
  • run "pep8 --repeat filename.py"
  • fix the stylistic errors

cd to main nipype directory (not nipype/nipype, but just nipype)

  • run "cd doc; make html; cd .." - check output (every interface should have a little description and a usage example)
  • run "make trailing-spaces; git co nipype/utils/tests/test_docparse.py"
  • run "make test"
  • fix any errors that came from your code (we'll also be doing this as part of the merge)
  • git commit and push

i'll put these guidelines in the docs and send out an email by tonight. hopefully i'll have a simple:
"make check-before-commit" to do the above steps automatically except for the fixes :)

@ssikka
Copy link
Contributor Author

ssikka commented Sep 27, 2011

thanks I am on it
:-)

On Tue, Sep 27, 2011 at 9:39 AM, Satrajit Ghosh <
reply@reply.github.com>wrote:

since i'm going to start requesting that people clean up code before we
merge and hopefully do so in a distributed manner, here are some new
guidelines. we are not there yet with consistency (i still need to do what
i'm asking), but i hope to clean up stylistic and base-class test coverage +
automated api test coverage soon.

this is more of a note to all (including myself)!

  • install pep8 (pip install pep8 will do just fine)
  • run "pep8 --repeat filename.py"
  • fix the stylistic errors

cd to main nipype directory (not nipype/nipype, but just nipype)

  • run "cd doc; make html; cd .." - check output (every interface should
    have a little description and a usage example)
  • run "make trailing-spaces; git co nipype/utils/tests/test_docparse.py"
  • run "make test"
  • fix any errors that came from your code (we'll also be doing this as part
    of the merge)
  • git commit and push

i'll put these guidelines in the docs and send out an email by tonight.
hopefully i'll have a simple:
"make check-before-commit" to do the above steps automatically except for
the fixes :)

Reply to this email directly or view it on GitHub:
#238 (comment)

@chrisgorgo
Copy link
Member

Would your fixes make it for the next release? (Due in a week)

@ssikka
Copy link
Contributor Author

ssikka commented Nov 3, 2011

Yes sure!

I am fighting a brutal deadline for sunday. I should be able to make sanity
checks on monday and proceed from there. Apologies on delaying things, just
getting fried with deadlines, but that should not be my excuse. Edits
coming on monday :-)

Best!
Sharad

On Wed, Nov 2, 2011 at 8:05 AM, Chris Filo Gorgolewski <
reply@reply.github.com>wrote:

Would your fixes make it for the next release? (Due in a week)

Reply to this email directly or view it on GitHub:
#238 (comment)

@bpinsard
Copy link
Contributor

I have a question about the way out_filename (-prefix or other outputs) is set for most interface, because it is not yet unified for all of these and we should make a choice before going further.
At this point most interfaces need a filename to be specified as an absolute path which make it not possible to use in a pipeline (except setting connect function that set the output name for each output).
Using genfile we could generate a name dynamically from the in_file (in general). Should we use a suffix/prefix as a trait to set the filename?

@satra
Copy link
Member

satra commented Nov 29, 2011

i think that's a great idea. in the fsl routines, we use genfile and a fixed suffix. if you want to make that optionally changeable for afni that would be good.

@satra
Copy link
Member

satra commented Dec 23, 2011

@ssikka @bpinsard : any update on this that you need to push? otherwise i'll start reviewing it.

@ssikka
Copy link
Contributor Author

ssikka commented Dec 23, 2011

I will start updating it from this morning. Apologies on the delay.
Best!
Sharad

On Fri, Dec 23, 2011 at 3:52 AM, Satrajit Ghosh <
reply@reply.github.com

wrote:

@ssikka @bpinsard : any update on this that you need to push? otherwise
i'll start reviewing it.


Reply to this email directly or view it on GitHub:
#238 (comment)

@chrisgorgo
Copy link
Member

Am I correct by assuming that gh-278 superseded this PR?

@satra
Copy link
Member

satra commented Mar 2, 2012

yes

@satra satra closed this Mar 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants