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

[23.1] Load latest version only into panel views #17034

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Nov 15, 2023

Might be a quick and dirty fix for

image

seen at vgp.usegalaxy.org. Need to figure out how I can test 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.

@jmchilton
Copy link
Member

% grep -r 'walk_loaded_tools' lib/
lib//galaxy/tool_util/toolbox/views/interface.py:def walk_loaded_tools(tool_panel: ToolPanelElements, toolbox_registry: ToolBoxRegistry):
Binary file lib//galaxy/tool_util/toolbox/views/__pycache__/edam.cpython-39.pyc matches
Binary file lib//galaxy/tool_util/toolbox/views/__pycache__/interface.cpython-39.pyc matches
lib//galaxy/tool_util/toolbox/views/edam.py:    walk_loaded_tools,
lib//galaxy/tool_util/toolbox/views/edam.py:        for tool_id, key, val, val_name in walk_loaded_tools(base_tool_panel, toolbox_registry):

I don't think this could fix this because that method is only used by EDAM? I think maybe definition_with_items_to_panel in static.py::StaticToolPanelView should instead not build sections with duplicated ids.

Copy link
Member

@jmchilton jmchilton left a comment

Choose a reason for hiding this comment

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

I appreciate the quick fix but I'd like to understand why add_tool_to_tool_panel_view isn't preventing this. It has code in there to try to it looks like. I'm happy to merge this and see if it works for now but I will try to follow up with a reversion of this today and a fix I'm more comfortable with. Is it possible to test this on test.galaxyproject.org - it seems to have the issue.

@jmchilton
Copy link
Member

The core tool panel just treats tool shed tools and local tools with multiple versions so differently and that is reflected out when applying filters:

in here with section.elems {'tool_toolshed.g2.bx.psu.edu/repos/iuc/fastp/fastp/0.19.5+galaxy1': <galaxy.tools.Tool object at 0x12f4f4a60>, 'tool_toolshed.g2.bx.psu.edu/repos/iuc/fastp/fastp/0.20.1+galaxy0': <galaxy.tools.Tool object at 0x12efb7e20>, 'tool_toolshed.g2.bx.psu.edu/repos/iuc/fastp/fastp/0.23.2+galaxy0': <galaxy.tools.Tool object at 0x12ef87910>, 'tool_multiple_versions': <galaxy.tools.Tool object at 0x12f463c10>}

I tried your fix here and it didn't seem to work in my local testing with this fastp tool in the above debug message. I'm still getting multiple versions repeated.

@mvdbeek
Copy link
Member Author

mvdbeek commented Nov 16, 2023

Let's do it right then

@mvdbeek mvdbeek closed this Nov 16, 2023
@mvdbeek
Copy link
Member Author

mvdbeek commented Nov 16, 2023

(Seeing that too, but I don't think the lineage is at fault, the is_newer / latest version is correct)

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.

2 participants