-
Notifications
You must be signed in to change notification settings - Fork 532
[WIP] Major refactor of input/output specs and autonaming #1240
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
'--outformat is set to spline the format will be a (4D) file of spline ' | ||
'coefficients.')) | ||
out_file = File( | ||
argstr='--out=%s', position=-1, name_source=['in_file'], name_template='%s_coeffs.nii', keep_extension=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.
why are we forcing the output to be nifti here?
please rebase/merge master - we have fixed the CircleCI tests |
…ipype into enh/NameSourceInBaseInterface
@@ -665,14 +534,122 @@ def _run_interface(self, runtime): | |||
nrows.append(mc_in.shape[0]) | |||
matrix = self._get_spm_submatrix(spmmat, sessidx, rows) | |||
self._stimcorr_core(motparamlist[i], intensityfiles[i], |
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.
Codacy only found this?? Then it's useless! :P
Seriously, this is still very preliminary. I am coding with the pylint on, so I also address these issues. I'll let you know when this is ready.
BTW, with this refactoring, we get rid of the infamous _list_outputs
:)
Make name_source available at BaseInterface level
This PR enables the functionality of name_source for any interface derived from BaseInterface. Previously, it only worked for CommandLine interfaces.
There's some previous discussion about this issue here #573.
And we started working on this from here #1234.
I have moved the old
_filename_from_source
inCommandLine
toBaseInterface
, with the new name of_resolve_namesource
.The
run()
method andcmdline
inCommandLine
call a wrapper to that function named_update_autonames
. This must be done AFTER mandatory inputs are checked.Regarding outputs, I set the output values in
aggregate_outputs
. I'm not 100% sure this is a good call though.TODO list
_list_outputs
nipype.algorithms.misc.Gunzip
)nipype.algorithms.misc.ModifyAffine
)nipype.algorithms.misc.Matlab2CSV
)List of interfaces that should be updated when this PR works