galaxyproject / galaxy

Data intensive science for everyone.
https://galaxyproject.org
Other
1.33k stars 966 forks source link

Strange behaviour for a tool integer parameter with `min="-1"` and no `max` #18161

Open simonbray opened 2 weeks ago

simonbray commented 2 weeks ago

I've encountered a strange issue with a tool, where one of the integer parameters has a minimum permitted value of -1 specified but no maximum permitted value. As a result, the input box in the GUI allows only the values -1 and 0 to be entered. Any value X higher than 0 causes the warning X is out of -1 - null range!

A draggable bar to select a value is also shown (wrongly, since there's no permitted maximum specified in the XML) and this allows values of up to 100 to be selected.

Here's a clip showing what I mean:

https://github.com/galaxyproject/galaxy/assets/32272674/4fb7e4ea-a3b0-488e-a5c4-5a88bb9c5c67

The tool in question is gmx_trj and the code for the parameters in the clip is:

<section title="Time" name="time" expanded="true">
    <param name="b" type="integer" label="Start time" help="Time (ps) of first frame to read from trajectory" value="0" min="0"/>
    <param name="e" type="integer" label="End time" help="Time (ps) of last frame to read from trajectory" value="-1" min="-1"/>
    <param name="dt" type="integer" label="Write frames at this time interval (ps)" help="Only write frame when t is exactly divisible by this value. Leave as 0 to record all frames." value="0" min="0"/>
</section>

This is with Galaxy 23.1.rc1 on our server but I also verified it on EU which is running 24.0.3.dev0.

bernt-matthias commented 2 weeks ago

See also https://github.com/galaxyproject/galaxy/issues/16335