genericworkflownodes / GenericKnimeNodes

Base package for GenericKnimeNodes
https://github.com/genericworkflownodes/GenericKnimeNodes
Other
15 stars 16 forks source link

Fix command generation for list parameters #237

Closed rrahn closed 5 years ago

rrahn commented 5 years ago

When using the LocalToolExecutor the commands are generated from the CLI Elements of the node model. If a tool was configured with multiple values for a respective list parameter, it is translated into the shell command: --list-opt val1 val2. This however fails for the SeqAn argument parser, which requires that each list option is prefixed with the list option name: --list-opt val1 --list-opt val2.

jpfeuffer commented 5 years ago

IIRC in the CTD Schema there is an attribute isList (additionally to the entry type ITEMLIST) that specifies how multiple values are expanded.

rrahn commented 5 years ago

Well yes and it expands to: --list val1 val2 instead of --list val1 --list val2. How are you handling multiple list values in your argument parser?

rrahn commented 5 years ago

The point is, that in the current version parameterlist values are put into a single linked list and added to the array list for the parameters to be expanded. Then in CLICommandGenerator:145-152 the values are prefixed with the list option name, but since all values are stored in a single linked list instead of each vlaue in it's own single linked list the prefix is only added once. In general there must have been some meaning behind this but obviously it was never tested with SeqAn apps in the first place.