Skip to content

Conversation

mick-d
Copy link
Contributor

@mick-d mick-d commented Oct 27, 2013

Minor correction to Camino ComputeEigensystem which required renaming the same test file in several interfaces.

@mick-d
Copy link
Contributor Author

mick-d commented Oct 27, 2013

Importantly, i would like to reorganize the Camino interfaces. One of NiPype's great functionality is to facilitate the switch from any software package to another having the same functionality. However several Camino interfaces are mis-categorized, especially the dti.py submodule containing several interfaces (tracking, etc.) which would highly benefit from being allocated to other Camino submodules (tracking.py, etc.).

This would be especially useful to see the associated new reorganization in the documentation and make it much easier for new and old NiPype users to switch diffusion MRI interfaces from one package to another. For example switching from a Camino ODF reconstruction (from the odf.py camino submodule i previously created) to an ODF in the MRtrix submodule, switching from one tracking interface to a Camino tracking interface that i would move to a dedicated tracking submodule, etc.

@mick-d
Copy link
Contributor Author

mick-d commented Oct 29, 2013

@satra @chrisfilo what do you think?

@satra
Copy link
Member

satra commented Oct 29, 2013

@mick-d - i think that reorganizing the interfaces will be useful. so please do send a PR on that.

Copy link
Member

Choose a reason for hiding this comment

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

pep8

@mick-d
Copy link
Contributor Author

mick-d commented Nov 9, 2013

@satra would it be possible to merge this? I thought it was already merged when i submitted this new PR but luckily this commit is on the same interface.

@satra
Copy link
Member

satra commented Nov 12, 2013

@mick-d - could you enable linking your github account to travis:

goto settings on the right in your nipype github page and the click service hooks on the left and the click the check box next to Travis. this will automatically run the nipype test suite whenever you push to your repo.

@mick-d
Copy link
Contributor Author

mick-d commented Nov 15, 2013

@satra sorry for the slow reply (ISMRM deadline). I enabled Travis. Before submitting again i run nosetests (which i already run before submitting this PR the first time) but this time got one error, i do not understand why:

FAIL: test_auto_ComputeEigensystem.test_ComputeEigensystem_inputs('-maxcomponents %d', '-maxcomponents %s') ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/lib/python2.7/dist-packages/numpy/testing/utils.py", line 314, in assert_equal raise AssertionError(msg) AssertionError: Items are not equal: ACTUAL: '-maxcomponents %d' DESIRED: '-maxcomponents %s' 

Where does the DESIRED component come from? I do not see anything relative to this desired component in the ComputeEigensystem Camino interface (dti.py) so i don't know how to correct this. How to fix this?

@satra
Copy link
Member

satra commented Nov 16, 2013

Nipype now auto generated tests. This likely means you changed a trait. Do a make check-before-commmit in the nipype source directory. It will fix the test.

@mick-d
Copy link
Contributor Author

mick-d commented Nov 16, 2013

Thanks Satra, what commands should I run for a check before commit? (Sorry never heard of that before)

@satra
Copy link
Member

satra commented Nov 16, 2013

it's actually make check-before-commit in the source directory. we should have a clear explanation of what that does:

  • builds docs
  • runs tests
  • fixes whitespaces
  • autogenerates basic spec tests
  • shows on the command line if any of the specs have keywords that are not appropriate
@mick-d
Copy link
Contributor Author

mick-d commented Nov 18, 2013

@satra the make check-before-commit didn't change the error. After the end of the build, the tests output the same error complaining about -maxcomponents %d. Any other solution?

@satra
Copy link
Member

satra commented Nov 18, 2013

could you run make test now? i suspect it has changed the autogenerated file and the tests will now pass. so you need to commit and push that change.

@mick-d
Copy link
Contributor Author

mick-d commented Nov 18, 2013

I had indeed to commit and push again (i don't understand why) and make test returns the same error.

@mick-d
Copy link
Contributor Author

mick-d commented Nov 18, 2013

Ok i understand, the tests change the whitespaces. But then make test still
returns the same error.

@satra
Copy link
Member

satra commented Nov 18, 2013

it should have also changed: test_auto_ComputeEigensystem.py

these are autogenerated tests and the specs condition in the Makefile re-generates it when you do make check-before-commit - can you do a git status to check if that file is changed?

@mick-d
Copy link
Contributor Author

mick-d commented Nov 18, 2013

Thanks for your help Satra. Unfortunately test_auto_ComputeEigensystem.py is not changed. Only interfaces/camino/dti.py is changed (whitespaces). I'll try again make check-before-commit

@mick-d
Copy link
Contributor Author

mick-d commented Nov 18, 2013

I can confirm same error after running make check-before-commit. Also git status returns no changes (since whitespaces are already fixed).

@mick-d
Copy link
Contributor Author

mick-d commented Nov 18, 2013

After rebasing, making 100% sure everything is in line with nipype/master (except for dti.py) still same error with make test and make check-before-commit and no file changed

@mick-d
Copy link
Contributor Author

mick-d commented Nov 18, 2013

I tried many things but i'm in a clean state and still same error. I'm totally stuck.

@satra
Copy link
Member

satra commented Nov 19, 2013

trying to figure out what's happening

nipype (master)]$ git checkout -b tst/mike upstream/pr/704 Branch tst/mike set up to track remote branch pr/704 from upstream. Switched to a new branch 'tst/mike' nipype (tst/mike)]$ make specs Checking specs and autogenerating spec tests python tools/checkspecs.py /software/nipy-repo/nipype/nipype/__init__.py:57: UserWarning: Running the tests from the install directory may trigger some failures warnings.warn('Running the tests from the install directory may ' /software/nipy-repo/nipype/nipype/interfaces/cmtk/nx.py:32: UserWarning: cmp not installed warnings.warn('cmp not installed') /software/nipy-repo/nipype/nipype/interfaces/cmtk/parcellation.py:32: UserWarning: cmp not installed warnings.warn('cmp not installed') /software/nipy-repo/nipype/nipype/interfaces/cmtk/convert.py:26: UserWarning: cfflib not installed warnings.warn('cfflib not installed') /software/nipy-repo/nipype/nipype/interfaces/cmtk/nbs.py:20: UserWarning: ConnectomeViewer not installed warnings.warn('ConnectomeViewer not installed') /software/nipy-repo/nipype/nipype/interfaces/nitime/analysis.py:29: UserWarning: nitime not installed warnings.warn('nitime not installed') nipype.interfaces.slicer.surface:ModelMaker:Outputs:modelSceneFile:exists nipype (tst/mike)]$ git diff diff --git a/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py b/nipype/interfaces/camino/tests/test index ff2229f..29810ba 100644 --- a/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py +++ b/nipype/interfaces/camino/tests/test_auto_ComputeEigensystem.py @@ -11,13 +11,15 @@ def test_ComputeEigensystem_inputs(): ), inputmodel=dict(argstr='-inputmodel %s', ), - outputdatatype=dict(argstr='-outputdatatype %s', + outputdatatype=dict(usedefault=True, + argstr='-outputdatatype %s', ), args=dict(argstr='%s', ), - inputdatatype=dict(argstr='-inputdatatype %s', + inputdatatype=dict(usedefault=True, + argstr='-inputdatatype %s', ), - maxcomponents=dict(argstr='-maxcomponents %s', + maxcomponents=dict(argstr='-maxcomponents %d', ), environ=dict(nohash=True, usedefault=True, (END) 
@mick-d
Copy link
Contributor Author

mick-d commented Nov 19, 2013

@satra do you have any idea of what may be going wrong?

@mick-d
Copy link
Contributor Author

mick-d commented Nov 20, 2013

Should be good to go now! This was a lot of work for the DTMetric interface. Many thanks for your help Satra.

satra added a commit that referenced this pull request Nov 20, 2013
New interface for Camino dtshape.
@satra satra merged commit f450b72 into nipy:master Nov 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants