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

Implement tool upgrade assistant. #18728

Merged
merged 2 commits into from
Aug 28, 2024
Merged

Conversation

jmchilton
Copy link
Member

Inspect a tool's XML file and provide advice on upgrading to new tool versions. It is implemented as library code in tool_util for integration with Planemo in the future but I've added a script here to run it on the command-line directly. It can also output in JSON for integration with external tools such as the galaxy language server.

I sat down to write a tool profile version upgrader to try to advance #18679... but I realized in light of macros it is impossible to do without implementing a whole new set of abstractions to track where parts of the tool XML definition are coming from. I both like my current abstractions and think those ones would be obnoxious 😆😅. Instead, I have settled for a tool that will provide advice on upgrading the tool based on its XML. It can point out things that will need to be fixed, things to consider but cannot be determined with a runtime, and things that you don't need to worry about (little bits of that planemo-green-serotonin where it makes sense).

Screenshot 2024-08-22 at 1 12 15 PM Screenshot 2024-08-22 at 12 28 01 PM

If someone thinks they can write a tool upgrader that deals with macros or can convince ChatGPT to do it - I think having all these test cases and all the semantic data in terms of upgrade codes, messages, and such will be helpful I am sure.

How to test the changes?

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@bgruening
Copy link
Member

Q; do you think you can autogenerate macros given a tools suite with a lot of duplications? Maybe only the simple ones, without arguments?

@jmchilton
Copy link
Member Author

I haven't done any dynamic programming since leaving graduate school... a thousand years ago but LCS on XML tokens sounds really fun and fairly viable. Macros are so low-level that you'd probably not even need to understand much about our XML format. I think rather than letting an algorithm decide what should be refactored, it might be better to bake it into the IDE plugin. Allow a dev to highlight a block and extract a macro from it. This is a common thing in a lot of programming environments - https://www.jetbrains.com/help/idea/extract-variable.html. I think a human is going to have a better understanding how these things should be decomposed.

@bgruening
Copy link
Member

The language server has support for that already. I will talk to @davelopez when he is back. Thanks @jmchilton

@jmchilton jmchilton force-pushed the tool_upgrade branch 5 times, most recently from b697873 to 692bb7a Compare August 23, 2024 13:42
Inspect a tool's XML file and provide advice on upgrading to new tool versions. It is implemented as a library in tool_util for integration with Planemo in the future but I've added a script here to run it on the command-line directly. It can also output in JSON for integration with external tools such as the galaxy language server.
@jmchilton jmchilton force-pushed the tool_upgrade branch 3 times, most recently from fd038d3 to 835c9f5 Compare August 24, 2024 18:45
@jmchilton jmchilton marked this pull request as ready for review August 26, 2024 13:23
@github-actions github-actions bot added this to the 24.2 milestone Aug 26, 2024
@mvdbeek mvdbeek merged commit fb4d5be into galaxyproject:dev Aug 28, 2024
51 of 55 checks passed
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