Skip to content

Conversation

ssikka
Copy link
Contributor

@ssikka ssikka commented Jan 24, 2012

New interfaces, with the

  1. clean code formatting done.
  2. Genfile attribute added to all interfaces
  3. Added new interfaces as compared to the ones in release.
@mwaskom
Copy link
Member

mwaskom commented Jan 25, 2012

Yay, AFNI interfaces!

It looks like these still need some work, though. First, they need some tests. At the moment, the module won't even import because of some issues with the indentation level of your docstrings. Take a look at, e.g., nipype/interfaces/fsl/tests/test_maths.py. The basic idea is, using the Nose framework, construct a bunch of class objects, set various inputs for typical use-cases, and then verify that the command-line that gets generated matches what you would write yourself. Additionally, it would be nice to have an example workflow that runs on some publicly available tutorial data, although since this looks like just a handful of interfaces it might not be possible to write an AFNI-only workflow that does a full set of processing.

Second, they still need some style work. Take a look at the pep8.py program, which should catch most things: http://pypi.python.org/pypi/pep8. In terms of the class names, the various interfaces should be CamelCase, i.e. Threedskullstrip => ThreeDSkullStrip.

I don't really use AFNI, but the fact that all their names start with 3d certainly is annoying from the perspective of writing a Python interface. I wonder if we even need the 3d part in our class names, though, in other words, if a script has this::

from nipype.interfaces import afni stripper = afni.SkullStrip() 

Most people are probably going to understand that it's the 3dskullstrip program that is getting called. @satra do you have thoughts on this? For instance, we don't start every Freesurfer interface with MRI.

Since my actual understanding of AFNI is extremely shallow, it would be nice if someone who had used it a bit more could take a look.

@ssikka
Copy link
Contributor Author

ssikka commented Jan 25, 2012

:-) sure!

Copy link
Member

Choose a reason for hiding this comment

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

enable the two lines on top of the file

Copy link
Member

Choose a reason for hiding this comment

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

also check the header on top of other interface files. there is a little snippet of python code that allows tests to be run with data in nipype/testing/data

@satra
Copy link
Member

satra commented Jan 27, 2012

i agree with @mwaskom that we can remove Threed from the interfaces. and presumably a lot of those commands work on 4d files!

@satra
Copy link
Member

satra commented Jan 27, 2012

let's try and polish this up within next week. also, with respect to test, focus on doctests as those turn into web examples. for each interface augment you doctest, so that you test the commandline. see for example:

http://www.mit.edu/~satra/nipype-nightly/interfaces/generated/nipype.interfaces.fsl.model.html#examples

Copy link
Contributor

Choose a reason for hiding this comment

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

we should maybe unify the inputspec parent classes across interfaces

@chrisgorgo chrisgorgo mentioned this pull request Feb 29, 2012
Copy link
Member

Choose a reason for hiding this comment

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

please capitalize the first letter of each class

also, one docstring example for each class.

@chrisgorgo
Copy link
Member

I've heard that you also have an example workflow working on publicly available data. Could you include it as well? This would help with testing.

@ssikka
Copy link
Contributor Author

ssikka commented Mar 1, 2012

Hi chris ,

Its on https://github.com/ssikka/fcon1000

Its 2 pipelines fcon_pipeline and jhu_pipeline , one is a full blown resting state preprocessing pipeline and the other one is a freesurfer surface pipeline...

@ssikka
Copy link
Contributor Author

ssikka commented Mar 1, 2012

Hi chris ,

Its on https://github.com/ssikka/fcon1000

Its 2 pipelines fcon_pipeline and jhu_pipeline , one is a full blown
resting state preprocessing pipeline and the other one is a freesurfer
surface pipeline...

Best!
Sharad

On Thu, Mar 1, 2012 at 5:46 AM, Chris Filo Gorgolewski <
reply@reply.github.com

wrote:

I've heard that you also have an example workflow working on publicly
available data. Could you include it as well? This would help with testing.


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

Copy link
Member

Choose a reason for hiding this comment

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

the docstr still requires some changes. could you follow the following format for all.

class X(object): """single sentence (no period at the end) <BLANK_LINE> Indented paragraph <BLANK_LINE> Examples ======== 
Copy link
Member

Choose a reason for hiding this comment

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

note the blank lines and the use of = for underlining.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about now?

https://github.com/ssikka/nipype/blob/08001ab1b24e96184962d56d8ed94c1fb6fb060c/nipype/interfaces/afni/preprocess.py
On Fri, Mar 2, 2012 at 11:22 AM, Satrajit Ghosh <
reply@reply.github.com

wrote:

+class To3D(AFNICommand):

note the blank lines and the use of = for underlining.


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

satra added a commit that referenced this pull request Mar 3, 2012
WIP New interfaces for AFNI
@satra satra merged commit beebf4f into nipy:master Mar 3, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants