-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement workflow parameter validators. #19092
Conversation
952cc64
to
8b3ae58
Compare
dc63ce8
to
2507b03
Compare
The API test failure is legit - no clue why though. |
b20b08f
to
f4cd8b4
Compare
@@ -7034,12 +7034,14 @@ def test_subworkflow_import_order_maintained(self, history_id): | |||
outer_input_1: | |||
type: int | |||
default: 1 | |||
optional: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mvdbeek Is this being required now a regression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3add680 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we might have to introduce something to track the meaning of default but no explicit optional ? Like the profile version we have for tools ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to revert 545d783 and I open a separate PR to work on this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we never exposed it in the UI and it was only available by hacking ga files for most - I'm fine with just forcing a new behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take you up on that but let me know if you want help with that piece. I've pulled out various related things - my test fixes and those two commits and pushed the result back into this branch. The pre-rebase version of my version of this branch is backed up at https://github.com/jmchilton/galaxy/tree/backup_min_max_regex_before_strip_default_handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's a good point, this is only ambiguous in the gxformat2 language where a default value would make the parameter optional previously. So you're okay with having to specify optional: true
in gxformat2 to create optional inputs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I think so 🤔.
Which allows building repeats and conditionals.
We don't need to replciate this logic just for workflow parameters.
- Allow specifying a min/max for integer and float parameters. - Swap language from regex to "Regular Expression" and synchronize help with regular expression fields in rule builder. - Extend regular expression help. - Improve default message for in_range validator. Probably a reversion in some ways introduced with galaxyproject#19027.
f4cd8b4
to
5219968
Compare
I don't love the UI but the model we're saving into the DB is pretty flexible, well tested, and can accommodate whatever so I think this is fine. We can I think iterate on the UI without this one locking us in (the way we have to build up the form on the backend and send that representation over the wire instead of a designed/modeled API is the only reason I have any doubt on that). |
Thanks a lot @jmchilton! |
Synchronized the working implementation in #18781 with the parameter models introduced in #19027. Extended it to include min/max on integer and float parameters and to synchronize language and help with regular expression inputs form the rule builder.
How to test the changes?
(Select all options that apply)
License