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

Improvements to help terms & tool help. #18722

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

jmchilton
Copy link
Member

@jmchilton jmchilton commented Aug 19, 2024

What is in the PR

  • Allow tools to declare markdown help.
  • Allow tools to reference help terms from their Markdown tools.
  • Auto generate help terms for each datatype from values in datatypes_conf.xml
  • Add permanent links for each help term - both the auto generated ones and the YAML specified
    ones.
  • Add some initial help terms for collection operations.
  • Use new help term for "map over" from tool form.

Motivation

I had the request to define "map over" in #18698. I don't want to do that in the context of a narrow tool - I'd rather make some progress on some longer term goals in dev. This is some infrastructure for embedding help terms (added as part of #17569) into tools - along with the option to allow Markdown help in tools (a long requested feature - xref #6230).

Screenshots

Map Over Terminology

One thing I did was to restore the term "map over" back into the tool form. It was removed a while ago but I think it is important to distinguish running a tool on a bunch of datasets vs. running a tool on collections. The different is important in terms of sample tracking and workflow construction.

24.1:
Screenshot 2024-08-19 at 2 04 47 PM

After:

Screenshot 2024-08-19 at 2 04 59 PM

Embedding Help Links into Tool Help:

Screenshot 2024-08-19 at 2 07 51 PM Screenshot 2024-08-19 at 2 07 59 PM

Help Terms for Datatypes ( per request from @bgruening )

Screenshot 2024-08-20 at 11 24 33 AM

Perm Links for Galaxy Terms

Screenshot 2024-08-20 at 11 26 30 AM Screenshot 2024-08-20 at 11 26 19 AM

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.

Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

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

Excellent, that is amazing!

@bgruening
Copy link
Member

It's a great idea!

Can we extend this to automatically include the filetype descriptions from datatypes_conf? Something like <HelpText text="NetCDF" extension="netcdf" />

@PlushZ Sorry, but I think @jmchilton implemented markdown support here already.

@jmchilton should we put the type="markdown" behind a tool profile version?

@jmchilton jmchilton changed the title [RFC][WIP] Ideas for improved collection help Improvements to help terms & tool help. Aug 20, 2024
@jmchilton
Copy link
Member Author

From @bgruening

Can we extend this to automatically include the filetype descriptions from datatypes_conf? Something like

It required rewriting a lot of stuff to use the API now and hence a pinia store but I have done this I think. There are now dynamic "help term URIs" for each datatype extension. I've added screenshots for this above.

@jmchilton
Copy link
Member Author

From @bgruening

@jmchilton should we put the type="markdown" behind a tool profile version?

I've updated the XSD to include allowing setting this... but I don't think so is the answer. We don't usually block features based on profile version right? We use it more to fix broken things or things we don't like in newer profiles. We aren't going to not load the help in older Galaxies and the best we could do is issue a warning about the help not rendering correct on older Galaxies during development. The thing I would do is to starting in 25.0 - make that profile version or newer use Markdown by default. Markdown is omnipresent and fewer people know RST every passing year.

@jmchilton jmchilton force-pushed the markdown_help_2 branch 4 times, most recently from 25e23ae to 5219dc5 Compare August 20, 2024 19:27
@bgruening
Copy link
Member

Very cool! I added an issue for the galaxy-language-server to add support for this.
Can you maybe add a test tool / documentation that shows how to use the syntax and what do you think about testing image embedding with the new markdown help?

Thanks a lot, @jmchilton!
I will ask some friends to help improve the datatype annotations.

@jmchilton
Copy link
Member Author

what do you think about testing image embedding with the new markdown help?

Almost a decade ago I wrote the implementation "drives me crazy" #1676 and as far as I'm aware nothing has changed 😆 😭. We won't really know if it works until we have an installed tool shed tool that uses the syntax. My guess is that it should just work though because the helper function that rewrites the paths is the same helper function that corrects headers tags and I have tested that header tags are properly corrected. The target code works on the generated HTML so it should be the same for rst and markdown more or less I think. I would not spend my time setting up a test for that - someone will report it if it doesn't work and then we will have an easier test bed for fixing any issues that arise.

If there is tool shed side code that doesn't work with the new syntax I have been told we're not updating the tool shed so I think that will likewise just need to be something to push off.

@bgruening
Copy link
Member

I'm totally fine with that :) Thanks a lot John!

@jmchilton jmchilton force-pushed the markdown_help_2 branch 2 times, most recently from 356902e to 1f5585d Compare August 21, 2024 18:18
@jmchilton
Copy link
Member Author

Can you maybe add a test tool / documentation that shows how to use the syntax...

I added some test tools that exercise various features of rst and markdown help.

@jmchilton jmchilton force-pushed the markdown_help_2 branch 4 times, most recently from 19852ce to 5b5d48a Compare August 23, 2024 13:52
- Allow tools to declare markdown help.
- Allow tools to reference help terms from their Markdown tools.
- Auto generate help terms for each datatype from values in datatypes_conf.xml
- Add permenant links for each help term - both the auto generated ones and the YAML specified
ones.
- Add some initial help terms for collection operations.
- Use new help term for "map over" from tool form.
@jmchilton jmchilton marked this pull request as ready for review August 24, 2024 15:21
@github-actions github-actions bot added this to the 24.2 milestone Aug 24, 2024
@jmchilton jmchilton merged commit 67b4a69 into galaxyproject:dev Sep 3, 2024
53 of 57 checks passed
@hexylena hexylena added highlight/dev Included in admin/dev release notes highlight Included in user-facing release notes at the top labels Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tool-framework highlight/dev Included in admin/dev release notes highlight Included in user-facing release notes at the top kind/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants