Skip to content

FIX: replace the MRtrix3 command fs_parc_replace_sgm_first to labelsgmfix #2652

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

Conversation

SheridanQ
Copy link

@SheridanQ SheridanQ commented Jul 25, 2018

The MRtrix3 has renamed the fs_parc_replace_sgm_first to labelsgmfix

Summary

Fixes # .

List of changes proposed in this PR (pull-request)

Acknowledgment

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

@effigies
Copy link
Member

Was there a version where the old command was correct? If so, we should make the command depend on the version.

@SheridanQ
Copy link
Author

Hi effigies,
I am new to the github, sorry that I didn't include this in my PR.
The last version where the old command was correct is version 0.3.13. After this version there was a major upgrade released on Mar 12 of 2016 that changed the command.

@effigies
Copy link
Member

Okay, then we'll need to create a nipype.interfaces.mrtrix3.base.Info class that knows how to determine the version number. We can then select the correct command name based on whether the version is > 0.3.13.

@satra @mgxd Is there an existing example of an interface that has changed _cmd on version, or what would be the best model for this?

@effigies effigies added this to the 1.1.2 milestone Jul 26, 2018
@mgxd
Copy link
Member

mgxd commented Jul 26, 2018

After making an Info class for Mrtrix3 similar to the one below

class Info(PackageInfo):
"""
Handle `wb_command` version information.
"""
version_cmd = 'wb_command -version'
@staticmethod
def parse_version(raw_info):
m = re.search(r'\nVersion (\S+)', raw_info)
return m.groups()[0] if m else None
class WBCommand(CommandLine):
"""Base support for workbench commands."""
@property
def version(self):
return Info.version()

you can have a check in the interface's __init__ that can compare versions and change the _cmd, something like we do here
if self.inputs.is_4d:
self._is_4d()
def _is_4d(self):
self._cmd = "c4d" if self.inputs.is_4d else "c3d"

@SheridanQ Lemme know if you have any questions/concerns!

@effigies
Copy link
Member

effigies commented Aug 6, 2018

Hi @SheridanQ. Just a bump on this. We're aiming to have the next release in about three weeks, so it'd be great to get this in within the next two weeks. Please let us know if you have any questions or need some further pointers.

@effigies effigies modified the milestones: 1.1.2, 1.1.3 Aug 10, 2018
@effigies
Copy link
Member

effigies commented Sep 4, 2018

Hi @SheridanQ. Please let us know if you need any help to finish this off.

@effigies
Copy link
Member

Hi @SheridanQ, we're going to try to release 1.1.3 next Monday. Do you have time to finish this one up before then?

@effigies effigies mentioned this pull request Sep 19, 2018
10 tasks
@effigies effigies removed this from the 1.1.3 milestone Sep 21, 2018
@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 Sep 21, 2018
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.

3 participants