Skip to content

Inconsistent behavior of inputs with name_template #1381

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

Open
oesteban opened this issue Feb 29, 2016 · 0 comments
Open

Inconsistent behavior of inputs with name_template #1381

oesteban opened this issue Feb 29, 2016 · 0 comments

Comments

@oesteban
Copy link
Contributor

Some interfaces are coded as follows: either they define an input as traits.Either(traits.Bool, traits.File) or they explicitly have a traits.Bool input and a traits.File input.

The idea is that the boolean input enables parsing the file and add it to the command line. Many times these filenames are generated automatically, using the genfile feature.

The genfile approach works because the developer has to explicitly code the name resolution and the outputs filling by overloading the _gen_filename and _list_outputs methods. The name_template approach fails because it automatically forwards the input to the output within the aggregate_outputs method. The workaround is: 1) use different names for the input and output traits and 2) hard code the input forwarding in the _list_outputs.

I think this is not very intuitive, and we need to define a standard behavior for this situation that happens oftentimes in, for instance, FSL.

Additionally, we've been working on unifying the name_template feature and the genfile feature. I think we can agree that name_template is probably more comprehensive and easy to use. However, it requires agreeing on some conventions about how to automate the inputs and outputs processing. I raised this as a question in #1371 .

I open this issue is to make this particular (and current) problem explicit.

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

No branches or pull requests

1 participant