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 various bugs around tool data table bundles #19659

Open
wants to merge 4 commits into
base: release_24.2
Choose a base branch
from

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Feb 19, 2025

Fixes #19609 and #18749 and also cleans up what data manager artefacts are potential bundles.

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.

This is a little cleaner. Also replaces the `list[tuple[str, str,
bool]]` return type of get_options with a NamedTuple.

Fixes galaxyproject#19609
The file_size hack turns out to not work, since people report related
bugs that they shouldn't have been able to run into without generating
bundles.
It's probably still true that bundles should produce a distinct
datatype.
@@ -66,6 +68,10 @@
union_type,
)

if TYPE_CHECKING:
from galaxy.model import DatasetInstance
from galaxy.security.idencoding import IdEncodingHelper
Copy link
Member

Choose a reason for hiding this comment

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

Please don't break the dependency structures 😿. galaxy-data stuff doesn't belong in the galaxy-tool-util package. It seems like it would be really clean to just move ParameterOption into galaxy.tools.parameters somewhere - nothing else in the parameter model layer even seems to depend on it.

Copy link
Member

Choose a reason for hiding this comment

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

I think this is fine, see #19642 (comment) for a rationale.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's fair, in a previous version I did actually need ParameterOption in tool_util. @jmchilton's comment also applies to line 46

Copy link
Member

Choose a reason for hiding this comment

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

Yep, line 46 is not type checking, so that's really breaking the package dependency structure.

Copy link
Member

Choose a reason for hiding this comment

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

The type imports are indicating a real dependency issue here - these are app concerns, they belong in app - the type dependency are evidence of it but it is true of them independently. I had no clue we were forward importing types but that seems like it is going to mask all sorts of problems we should be resolving with interfaces and better package structure. We really should not be doing that IMO and if it needed it should be used very minimally and we should document the problems they are indicating and create issues for follow up to resolve them.

Copy link
Member

Choose a reason for hiding this comment

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

I really appreciate you moving the class @mvdbeek - thank you so much!

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