Improvements to parameter models for test case inputs#18743
Merged
jmchilton merged 4 commits intogalaxyproject:devfrom Sep 19, 2024
Merged
Improvements to parameter models for test case inputs#18743jmchilton merged 4 commits intogalaxyproject:devfrom
jmchilton merged 4 commits intogalaxyproject:devfrom
Conversation
8fead2b to
0d61d7d
Compare
0d61d7d to
fd4b182
Compare
mvdbeek
approved these changes
Sep 18, 2024
| cast(XmlTestCollectionDefDict, test_input.get("attributes", {}).get("collection")) | ||
| ).test_format_to_dict() | ||
| elif isinstance(tool_input, (DataParameterModel,)): | ||
| data_tool_input = cast(DataParameterModel, tool_input) |
Member
There was a problem hiding this comment.
Is this cast necessary ? mypy has no problems with this
Member
Author
There was a problem hiding this comment.
I did not know that - good to know. I think I've gotten in the habit of doing that with parameters because I so often am dispatching on the parameter_type string maybe. I think it kind of reads better this way but I will admit it is more code. I will defer to you and remove the casts in my working branch if you'd like.
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As I mentioned in the discussion on #18679, the inputs for the parameter models developed there for test case inputs were a bit arbitrary. While useful for validation in that context - when I went to go use them in developing the tool request API it was clear that aligning them with the tool request syntax would be useful and rather than adding another layer and another version of the models I just reworked the existing ones. I also mentioned there I wanted to develop a set of models for YAML test descriptions that could be used with tool APIs a lot more directly. So this PR translates the test case validation intermediate format to just be YAML format and adds more specific tests and models for that.
How to test the changes?
(Select all options that apply)
License