hexylena / galaxyxml

XML Generation libraries for Galaxy Tool/ToolDeps XML
Apache License 2.0
6 stars 5 forks source link

support positional args #1

Open hexylena opened 9 years ago

hexylena commented 9 years ago

maybe use generated names or ... ?

fubar2 commented 3 years ago

For positional parameters, the entire tool command line must be formed in a specific order.

PR will follow shortly with a command_line_override option in the tool to work around this for a project where it matters until a better fix.

Fixing this properly is more involved so before I try, here's some reasoning:

"positional" is usually a characteristic of a complete set of CL parameters associated with a particular tool Seems redundant at the individual parameter level.

Only input and output params can have position? None of the complex repeats/conditionals are predictable enough for a positional tool CL.

Each parameter in a positional CL has an ordinal position. Add a unique integer "position", defaulting to None to the constructors. Check them if the positional attribute of the tool is true, so the final tool CL can be generated in the correct order. At export for a positional command line, the (current) list of cli from outputs and inputs need to be ordered by a (new) list of the ordinals.

I can work around this for now but could try to implement something like this if it won't break much else