Skip to content

ENH: Add interface for fslorient #2955

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

Closed
wants to merge 1 commit into from
Closed

Conversation

felixsc1
Copy link

@felixsc1 felixsc1 commented Jul 7, 2019

Summary

Simple interface for fslorient.
Input arguments:

  • string 'main_option' (mandatory)
  • sformcode (optional)

Acknowledgment

  • I acknowledge that this contribution will be available under the Apache 2 license.

Pasted it above 'Reorient2Std'.
Copy link
Collaborator

@TheChymera TheChymera left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution, please consider the suggested improvements.

out_file = File(desc = "out file", exists = True)


class FslOrient(FSLCommand):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please add a minimal usage example analogous to that seen in other interfaces in this module:


class FslOrientInputSpec(FSLCommandInputSpec):
in_file = File(exists=True, desc='input file', argstr='%s', position=2, mandatory=True)
main_option = traits.Str(desc='main option', argstr='-%s', position=0, mandatory=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this command takes a specific (and historically very stable) set of main options, it would be best to enumerate them. The current interface attempt available in SAMRI demonstrates how.

@effigies effigies added this to the 1.2.2 milestone Aug 30, 2019
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Hi @felixsc1, I wonder if you have some time to address @TheChymera's suggestions? I've also made a couple.

@@ -1700,7 +1700,28 @@ def _gen_filename(self, name):
return self._list_outputs()['out_file']
return None


class FslOrientInputSpec(FSLCommandInputSpec):
in_file = File(exists=True, desc='input file', argstr='%s', position=2, mandatory=True)
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest adding copyfile=True, since this tool modifies the input file. This will only have an effect in workflows/nodes. (See https://nipype.readthedocs.io/en/latest/devel/interface_specs.html)

Suggested change
in_file = File(exists=True, desc='input file', argstr='%s', position=2, mandatory=True)
in_file = File(exists=True,
copyfile=True,
desc='input file',
argstr='%s',
position=2,
mandatory=True)

def _list_outputs(self):
outputs = self.output_spec().get()
outputs['out_file'] = os.path.abspath(self.inputs.in_file)
return outputs
Copy link
Member

Choose a reason for hiding this comment

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

These three lines are over-indented.

@oesteban oesteban modified the milestones: 1.2.2, 1.3.0, 1.2.3 Sep 5, 2019
@effigies
Copy link
Member

Hi @felixsc1, we're aiming for a release in the next week or so, if you'd like to try to get this in by then.

Please let us know if you need any help.

@effigies effigies modified the milestones: 1.2.3, future, 1.3.0 Sep 18, 2019
@effigies effigies modified the milestones: 1.3.0, 1.4.0 Nov 11, 2019
@effigies
Copy link
Member

Hi @felixsc1, sorry to do this to you, but we just merged some pretty huge changes. Could you re-apply these changes on the latest master? You'll want to re-run make specs entirely, and we're now using the Black formatter. You can run it manually, or use pre-commit to have it automatically run every time you commit.

Please let me know if you need any help or clarifications.

@effigies effigies modified the milestones: 1.4.0, 1.5.0 Dec 14, 2019
@effigies effigies mentioned this pull request Feb 23, 2020
17 tasks
@effigies
Copy link
Member

This pull request is "orphaned," which means it has been deemed to be abandoned by its original author. Orphaned pull requests have not been rejected, and we hope that if a user sees one that will meet their needs with a little work, that they will fork it and open a new pull request (or, in the case of the original author, reopen the original PR).

We ask that all adopted PRs be updated to merge or rebase the current master. If you would like to adopt a PR and need help getting started, any of a number of contributors will be happy to help.

@effigies effigies closed this Feb 23, 2020
@effigies effigies removed this from the 1.5.0 milestone May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants