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

TestsCaseValidation: "" not allowed for optional selects? #19325

Open
bernt-matthias opened this issue Dec 14, 2024 · 1 comment
Open

TestsCaseValidation: "" not allowed for optional selects? #19325

bernt-matthias opened this issue Dec 14, 2024 · 1 comment

Comments

@bernt-matthias
Copy link
Contributor

Describe the bug

For this test parameter the new linter reports the following error (which seems correct) -- but it remains even if I set optional="true" for the outputs parameter (as it probably should be):

.. WARNING (TestsCaseValidation): Test 4: failed to validate test parameters against inputs - tests won't run on a modern Galaxy tool profile version. Validation errors are [6 validation errors for PydanticModelFor[augustus]
outputs.0.literal['protein']
  Input should be 'protein' [type=literal_error, input_value='', input_type=str]
outputs.0.literal['codingseq']
  Input should be 'codingseq' [type=literal_error, input_value='', input_type=str]
outputs.0.literal['introns']
  Input should be 'introns' [type=literal_error, input_value='', input_type=str]
outputs.0.literal['start']
  Input should be 'start' [type=literal_error, input_value='', input_type=str]
outputs.0.literal['stop']
  Input should be 'stop' [type=literal_error, input_value='', input_type=str]
outputs.0.literal['cds']
  Input should be 'cds' [type=literal_error, input_value='', input_type=str]]

Also this one its really tricky to read, because the name of the parameter is not mentioned anywhere.

Ping @jmchilton

Galaxy Version and/or server at which you observed the bug
Galaxy Version: 24.2

@mvdbeek
Copy link
Member

mvdbeek commented Dec 16, 2024

"" is not None, so the error makes sense, you're strictly speaking selecting an option that doesn't exist. value_json="null" should be the precise type for a an unset option (or skip it if the test is meant to test the default).
We might want to relax the type coercion in the pydantic model when we're parsing xml tools where all types are pretty much strings, unless we use workarounds like value_json. The parameter is the first one , outputs.0 is the "path notation" for the output.

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

No branches or pull requests

2 participants