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

[24.2] Fix default value handling for parameters connected to required parameters #19219

Merged

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Nov 28, 2024

and allow authors to set a default value for optional and non-optional parameters.

59dc2a4 fails tests prior to this PR, the fix for that is in 8546b50 which is why I think we should add this to 24.2.

For optional and non-optional parameters we fill the run form with the default value and allow users to change it. The run form will prevent submitting the workflow for a non-optional value if the user has removed the default value, while for an optional parameter the workflow will be submitted with null as input. That aligns with optional input parameter outputs only being connectable to optional inputs.

With this PR we align with https://www.commonwl.org/v1.2/Workflow.html#WorkflowInputParameter:

The default value to use for this parameter if the parameter is missing from the input object, or if the value of the parameter in the input object is null.

See default_values.gxwf-tests.yml for a test case exercising this

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

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

@mvdbeek mvdbeek force-pushed the required_parameters_with_default branch 2 times, most recently from 7ab0178 to ebb440d Compare November 29, 2024 15:05
@mvdbeek mvdbeek force-pushed the required_parameters_with_default branch from ebb440d to 59dc2a4 Compare November 29, 2024 15:43
@mvdbeek mvdbeek changed the title Add support for required parameters with default [24.2] Fix optional default value handling for parameters connected to required simple parameters Nov 29, 2024
@mvdbeek mvdbeek changed the title [24.2] Fix optional default value handling for parameters connected to required simple parameters [24.2] Fix default value handling for parameters connected to required simple parameters Nov 29, 2024
@mvdbeek mvdbeek changed the title [24.2] Fix default value handling for parameters connected to required simple parameters [24.2] Fix default value handling for parameters connected to required parameters Nov 29, 2024
@mvdbeek mvdbeek changed the base branch from dev to release_24.2 November 29, 2024 15:46
@mvdbeek mvdbeek marked this pull request as ready for review November 29, 2024 16:50
@github-actions github-actions bot added this to the 25.0 milestone Nov 29, 2024
@jmchilton jmchilton merged commit d4c2101 into galaxyproject:release_24.2 Nov 29, 2024
63 of 65 checks passed
@jdavcs jdavcs modified the milestones: 25.0, 24.2 Dec 4, 2024
@nsoranzo nsoranzo deleted the required_parameters_with_default branch December 16, 2024 16:27
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.

3 participants