-
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 default locations for data and collection parameters. #14955
Conversation
20b361b
to
d8c2d8b
Compare
d8c2d8b
to
b0954fa
Compare
Works for both files and collections. Workflow defaults override tool defaults. TODO: - Unit test case to ensure this only works for non-default, non-multi data parameters. - Implement XSD once syntax is finalized.
b0954fa
to
5f4779c
Compare
Initial rebase for the 2023 biohackathon done... next step is I think synchronizing this with the conditionals work. They both brought in similar code from the CWL branch in different ways. |
XSD needs some progress made also - luckily test failures caught this.
|
Test tools now validate and I fixed the typing issue I discovered in the conditional branch of the code. I'd be interesting to see how this works the CWL branch now. |
742f8d8
to
0d55fd0
Compare
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.
Thanks a lot @jmchilton!
@@ -2094,6 +2099,11 @@ def __init__(self, tool, input_source, trans=None): | |||
self._parse_options(input_source) | |||
# Load conversions required for the dataset input | |||
self.conversions = [] | |||
self.default_object = input_source.parse_default() | |||
if self.optional and self.default_object is not None: | |||
raise ParameterValueError( |
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.
That seems like a perfectly legitimate case, just like default values on optional parameters. It's a UI thing that we can't reset them to None/null/undefined (didn't check, it might actually be possible now) ... but let's get this in, this is a slightly off-topic discussion.
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 don't disagree in principle but perhaps better to add explicitly after the fact with a lot of intentionality and with explicit tests - UI + API + Cheetah Tests.
Works for both files and collections. Workflow defaults override tool defaults.
This is not strictly better or worse than #14938 / #13110, but to my eyes this is both cleaner than that approach and brings in more CWL (the
raw_to_galaxy
here is a cleanup and generalization of a CWL-branch-ism). Both approaches commit Galaxy to doing some long term, difficult things - I think by not adding a new tool form type, not adding new models, not adding new ways users can have data associated with their account, etc... this approach is a bit more conservative. Both approaches do some things with workflow state that make me uncomfortable and this approach adds some tool features - but I feel good about the tool features (they are useful, tested, and feel both cohesive and 'galaxy').TODO:
How to test the changes?
(Select all options that apply)
License