Skip to content
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

Draft
wants to merge 15 commits into
base: dev
Choose a base branch
from

Conversation

jmchilton
Copy link
Member

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.

Screenshot 2024-10-31 at 11 58 51 AM Screenshot 2024-10-31 at 11 58 37 AM Screenshot 2024-10-31 at 1 09 15 PM

How to test the changes?

(Select all options that apply)

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

if source_type == "regex":
form_validators.append(
{
"__index__": i,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we we need the __index__ field ? I thought this was legacy stuff from way back ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just felt safer since it is only used by the client UI. I tried dropping it though and everything seems fine still.

- 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.
@jmchilton
Copy link
Member Author

The API test failure is legit - no clue why though. GALAXY_TEST_TOOL_CONF="test/functional/tools/sample_tool_conf.xml" GALAXY_CONFIG_OVERRIDE_CONDA_AUTO_INIT=false pytest -s lib/galaxy_test/api/test_workflows.py::TestWorkflowsApi::test_export_invocation_ro_crate_adv. I'll dig into it Monday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants