populse / capsul

Collaborative Analysis Platform : Simple, Unifying, Lean
Other
7 stars 14 forks source link

Disucssion about nipype wrapping #216

Closed denisri closed 2 years ago

denisri commented 2 years ago

In Capsul v2, nipype interfaces were wrapped in a capsul Process like this:

However in capsul v3, fields are apparently not allowed to begin with an underscore. When we do it we see the message:

/casa/host/build/python/soma/controller/controller.py:195: RuntimeWarning: fields may not start with an underscore, ignoring "_inskull_mask_file"

So what should we do about that ?

  1. use another prefix/suffix ?
  2. use the "real" output names, and when a parameter happens to be both in inputs and outputs, do something else 2.1.rename it, 2.2. or make it an "input/output" parameter, for which we currently don't have a notion for, nor a representation in GUIs or pipeline graphs, links, etc.

In any case we would have to modify all existing processes/pipelines using nipype interfaces, because all their output parameters would change names.

sapetnioc commented 2 years ago

If Nipype allows to have two different values, we cannot choose 2.2. Moreover this is the more complex solution to implement. I would choose a 2.3 very close to 2.1. If two parameters with the same name are present in input and output then we rename both. For instance, main_output would become main_output_i and main_output_o. That way, user have to add a suffix (coul be a prefix) even for input parameter so he knows that there are two values for this one.

denisri commented 2 years ago

Why not. OK.