-
Notifications
You must be signed in to change notification settings - Fork 532
WIP: Dtitk #2185
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
WIP: Dtitk #2185
Conversation
|
@mgxd I'm not sure how to debug this; if you have any suggestions they are most welcome. I merged with the current nipype master, but am getting the error, below, in the circleci.
Are you familiar with the error, below? It's the same one I get when I try make check-before-commit and was having trouble figuring out. Thanks! ____ ERROR collecting nipype/interfaces/dtitk/tests/test_auto_AffineTask.py ____ |
regarding travis - you're missing an for circle - did you start working on this branch awhile ago? It seems your circle build is not running on 4x parallelism, you may have to manually change that within your circleci build settings. Perhaps @oesteban can chime in here |
Yes - for circle just go to https://circleci.com/gh/kesshijordan/nipype/edit#parallel-builds and set |
Codecov Report
@@ Coverage Diff @@
## master #2185 +/- ##
=========================================
Coverage ? 72.41%
=========================================
Files ? 1210
Lines ? 59762
Branches ? 8595
=========================================
Hits ? 43274
Misses ? 15090
Partials ? 1398
Continue to review full report at Codecov.
|
@kesshijordan you are close to passing the checks - you'll just have to run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments - note that I haven't actually tested the functions though
.cache/v/cache/lastfailed
Outdated
@@ -0,0 +1,22 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file isn't necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two quick questions:
- There isn't anything in the directories from .cache on: Is there any reason not to remove everything including .cache? (or is it better to just delete lastfailed?)
- I see the comment about lastfailed not being necessary: is that the only comment, or is there somewhere else I should be looking for other comments?
Thanks again, @mgxd!
Kesshi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I believe the
.cache
directory is created bypytest
when running nipype's tests, and this file just serves as a reminder when retrying - you can keep this in your local clone, but it doesn't really serve a purpose on the master repo. - Nope, that's it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kesshijordan - lastfailed
is the only one that's included in the commit. probably got added by mistake. but in general nothing in .cache
should be in the commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kesshijordan and @mgxd - could this be reviewed/updated soon? i think it's very close. |
nipype/interfaces/dtitk/__init__.py
Outdated
""" | ||
|
||
# from .base import () | ||
from ..dtitk.registration import (RigidTask, AffineTask, DiffeoTask, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from .registration import ...
is a bit cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
nipype/interfaces/dtitk/__init__.py
Outdated
ComposeXfmTask, diffeoSymTensor3DVolTask, | ||
affSymTensor3DVolTask, affScalarVolTask, | ||
diffeoScalarVolTask) | ||
from ..dtitk.utils import (TVAdjustOriginTask, TVAdjustVoxSpTask, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
def _list_outputs(self): | ||
outputs = self.output_spec().get() | ||
outputs['out_file_xfm'] = self.inputs.in_file.replace('.nii.gz', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may be a good time to use _gen_fname()
|
||
def _list_outputs(self): | ||
outputs = self.output_spec().get() | ||
outputs['out_file_xfm'] = self.inputs.in_fixed_tensor.replace( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
if not isdefined(self.inputs.out_file): | ||
outputs["out_file"] = self._gen_fname(self.inputs.in_file, | ||
suffix=self._suffix, | ||
ext='.'+'.'.join( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this cover .nii
files too?
.cache/v/cache/lastfailed
Outdated
@@ -0,0 +1,22 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I believe the
.cache
directory is created bypytest
when running nipype's tests, and this file just serves as a reminder when retrying - you can keep this in your local clone, but it doesn't really serve a purpose on the master repo. - Nope, that's it!
is this still a wip, or is this ready for merge? |
Still a WIP... I need to test the way I addressed the last few comments to make sure I don't mess anything up naming the outputs. |
@kesshijordan - any chance we can get this in by the oct 31 deadline? we are going to cut a new release. |
👍 |
@kesshijordan - a recent PR from @oesteban takes care of the unicode issue. could you please make sure you are merged with current master? |
@satra I think that PR did not affect the @kesshijordan, in order to facilitate your debugging, could you set I have opened an issue (link is above) for the UnicodeDecodeError problem. |
Thanks, @oesteban! I set it when I use the interface (like the example below), and it will run without the UTF-8 error. This doesn't interfere with my debugging, but FYI: if I run it such that the command line would throw and error, the node runs until manually killed with control C. When you kill it and open up the stderr.nipype, the node appears to be running over and over with jumbled letters replacing the filenames. |
Thanks for the pointers, @mgxd. I tried your suggestion for installing and it worked... this is much easier! Regarding question 2: the error occurred because I hadn't set some of the inputs the command line needed; I am using python 3 (though when I first ran this, I think I was using 2.7). I got the rigid registration interface to work and will modify the subsequent interfaces in the same way so they take two niftis and a set of parameters instead of a nifti and a text file containing a nifti (different functions in dti-tk). I'm having trouble getting the generalized file naming to work based on other examples (I keep getting errors that it isn't a "file name" when I manipulate the string) so right now I'm just leaving it at only supporting .nii.gz so I can try to get the rest done before the deadline tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kesshijordan we can support nii.gz
for now, make sure to merge to upstream and remove the extra files and this should be merged soon
stderr.nipype
Outdated
@@ -0,0 +1,3 @@ | |||
/Users/kesshijordan/repos/dtitk-2.3.3-Darwin-x86_64/scripts/dti_diffeomorphic_reg: line 191: [: 1.0: integer expression expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove this
stdout.nipype
Outdated
@@ -0,0 +1,3 @@ | |||
registering /Users/kesshijordan/ref_data/interscan_dys/Trio/IC004-1_dti_b2000_EC_tensorx1000_aff.nii.gz to /Users/kesshijordan/ref_data/interscan_dys/Prisma/IC004-4_dti_b2500_SC_EC_tensorx1000.nii.gz ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also remove
@@ -0,0 +1,16 @@ | |||
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this too
Is this something we want in for 1.0? I merged master and updated the auto tests. |
Tests are passing. Is this good to merge? @mgxd @kesshijordan |
we will probably need to re-add the yapf stylized files after |
Changes proposed in this pull request
Note: make check-before-commit is throwing an error (see below) I am having trouble figuring out. If anyone has suggestions, please let me know.
Thanks!
____ ERROR collecting nipype/interfaces/dtitk/tests/test_auto_AffineTask.py ____
nipype/interfaces/dtitk/tests/test_auto_AffineTask.py:3: in
from ..registration import AffineTask
E ValueError: attempted relative import beyond top-level package
____ ERROR collecting