-
Notifications
You must be signed in to change notification settings - Fork 533
fix: MNIBiasCorrection smart out_file #1806
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1806 +/- ##
==========================================
- Coverage 73.09% 73.03% -0.07%
==========================================
Files 1064 1064
Lines 53322 53329 +7
==========================================
- Hits 38978 38947 -31
- Misses 14344 14382 +38
Continue to review full report at Codecov.
|
|
||
# test raising error with only partial mandatory args present | ||
mni.inputs.in_file = filelist[0] #mgz | ||
with pytest.raises(ValueError): mni.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.
this shouldn't raise an error. the point of having name_source
and template
is to autogenerate an out_file
name. if that's not happening sth is broken.
also you shouldn't have to call run()
for testing this. just, mni.cmdline
@@ -1528,7 +1528,7 @@ class MNIBiasCorrection(FSCommand): | |||
output_spec = MNIBiasCorrectionOutputSpec | |||
|
|||
def _list_outputs(self): | |||
outputs = self._outputs().get() | |||
outputs = self._output_spec().get() |
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 shouldn't need to be the case. what is failing with _outputs
?
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.
Since most other interfaces are using outputspec - I wanted to test. I can revert this
@@ -1468,7 +1468,7 @@ class MNIBiasCorrectionInputSpec(FSTraitedSpec): | |||
in_file = File(exists=True, mandatory=True, argstr="--i %s", | |||
desc="input volume. Input can be any format accepted by mri_convert.") | |||
# optional | |||
out_file = File(argstr="--o %s", name_source=['in_file'], genfile=True, | |||
out_file = File(argstr="--o %s", name_source=['in_file'], |
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.
why is genfile=True
removed here?
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 had added it in a previous test, but the out_file was still not being found
@@ -1467,11 +1476,11 @@ class MNIBiasCorrectionInputSpec(FSTraitedSpec): | |||
# mandatory | |||
in_file = File(exists=True, mandatory=True, argstr="--i %s", | |||
desc="input volume. Input can be any format accepted by mri_convert.") | |||
out_file = File(argstr="--o %s", name_source=['in_file'], | |||
# optional | |||
out_file = File(argstr="--o %s", name_source=['in_file'], genfile=True, |
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.
genfile=True
is not required. could you also merge with master?
@oesteban - it seems like the docker container is being built every time. should that be happening? |
@oesteban - docker build error:
|
For some reason I don't know, conda update is doing some funky stuff with the permissions. Matplotlib is installed but then permissions are too restrictive. @chrisfilo and I had to add this line for that very reason. That error happened before with the python 2.7 build. I'll fix that now |
Ok, now it is fixed: https://circleci.com/gh/oesteban/nipype/454 (to be merged within #1825) |
@satra this is all set |
#1800