Skip to content

Fix name_source to handle missing source #2506

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
effigies opened this issue Mar 23, 2018 · 2 comments
Closed

Fix name_source to handle missing source #2506

effigies opened this issue Mar 23, 2018 · 2 comments
Labels
Milestone

Comments

@effigies
Copy link
Member

As discussed in #2450, the name_source logic is not working as expected.

Consider the following input spec:

class NwarpAdjustInputSpec(AFNICommandInputSpec):
    warps = InputMultiPath(
        File(exists=True),
        minlen=5,
        mandatory=True,
        argstr='-nwarp %s',
        desc='List of input 3D warp datasets')
    in_files = InputMultiPath(
        File(exists=True),
        minlen=5,
        argstr='-source %s',
        desc='List of input 3D datasets to be warped by the adjusted warp '
             'datasets.  There must be exactly as many of these datasets as '
             'there are input warps.')
    out_file = File(
        desc='Output mean dataset, only needed if in_files are also given. '
             'The output dataset will be on the common grid shared by the '
             'source datasets.',
        argstr='-prefix %s',
        name_source='in_files',
        name_template='%s_NwarpAdjust',
        keep_extension=True,
        requires=['in_files'])

The goal is to automatically derive an out_file value iff in_files is set. There was some discussion over whether the traits are correct as is (e.g. @oesteban suggested that requires is not needed for out_file), but it did seem to be agreed that the goal should be achievable purely using traits without overriding interface methods.

@effigies effigies added the bug label Mar 23, 2018
@effigies effigies added this to the 1.0.3 milestone Mar 23, 2018
@effigies
Copy link
Member Author

Figure I should bump this before we get too close to release. Does anybody have time to figure this out?

@oesteban @satra Are there open issues to discuss, or is it a question of implementation?

@oesteban
Copy link
Contributor

I think it is mostly a question of implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants