Open bgruening opened 5 years ago
Hi @bgruening ! Looking back to gdal tools I'm not sure to understand why you said that 'unless' statements are not optimal. Some options needs to be called with a value and unless allows me to check that.
Back then I added option1Value examples in the wrapper value field to check like follow :
<param name="option1Value" value="eg : some value" ...
`#unless option1Value=='eg some value'
-option option1Value
it's the same as empty value in the wrapper and :
<param name="option1Value" value="" help="eg : some value" ...
`#if option1Value!=""
-option option1Value
If I do not check option1Value content I will probably encounter issues with options that can't be empty. For example -sql ''
will probably fail.
Is it just that if statement are more natural that unless ?
Yes IF is really more convenient than unless. If you want please look at https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini these are a lot of tools that also allow partially SQL syntax. You can also look at those tools at usegalaxy.eu.
Ok ! gemini tools are great with advanced use of macros thks to pointed them out.
I see its possible to checks empty param values either with a if!=''
in command block or with a validator
field in <param/>
block.
I guess validator should be favoured
Thanks @Alanamosse for doing all this. This is pretty amazing!
jpeg
in the requirements are not needed imho<param name="b" type="text" label="-b band" value="e.g : -b 1 -b 2 -b 3"/>
the label should be a small text indicating what the user should expect. The help can look like the label here if its wished.You could also add the label from above to the help and call the label just
SQL query to perform again your dataset.
The#unless
can be removed completely and should make your tool way smaller. This can be done in a lot of places. Please note that you do not setvalue="eg: SELECT ..."
so the unless is really unnecessary.Same here:
<param name="wo" type="text" label="-wo" value="NAME=VALUE" />
putting the content from the value in the help would remove the unless and make your tool look better to the user imho.unless
is really used very rarely I guess, so there should be ways to avoid it :)