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

Support PATH_TO_IMAGES in vanilla Galaxy tools. #1676

Open
jmchilton opened this issue Feb 4, 2016 · 7 comments
Open

Support PATH_TO_IMAGES in vanilla Galaxy tools. #1676

jmchilton opened this issue Feb 4, 2016 · 7 comments

Comments

@jmchilton
Copy link
Member

Currently only works for tool shed installed tools, differing behavior for tool shed installed tools and vanilla tools drives me crazy 😄.

https://twitter.com/dpryan79/status/695254422956425216

@nsoranzo
Copy link
Member

nsoranzo commented Feb 4, 2016

👍

@pvanheus
Copy link
Contributor

pvanheus commented Jul 5, 2016

Similar request from here: https://biostar.usegalaxy.org/p/18371/ - as I proposed, possible an API call could provide a link to images/ in the tool dir?

@pjbriggs
Copy link

pjbriggs commented Aug 24, 2017

I don't think this issue has anything to do with the use of $PATH_TO_IMAGES (which is not actually required anyway, see e.g. galaxy-iuc/standards#46) - it's more generally about how Galaxy handles the .. image:: directive in the tool help.

As far as I can make out, Galaxy only seems to process the directive for tools which have been installed via a toolshed - specifically in the __inititalize_help method of the Tool class in lib/galaxy/tools/__init__.py:

    ...
    help_text = tool_source.parse_help()
    if help_text is not None:
        if self.repository_id and help_text.find( '.. image:: ' ) >= 0:
    ...

If I've understood this correctly then there would need to be some new code to handle when the tool is not an installed repository, coupled with some mechanism for actually serving the image file from wherever it is on the filesystem (as pointed out by @pvanheus). Could one possibility be to inline the images (e.g. base64 encode them)?

Either way I'd suggest change the title of this issue to remove the reference to $PATH_TO_IMAGES.

@SamGG
Copy link

SamGG commented Oct 5, 2018

Hi,
I am facing the same problem. What is the solution/workaround?
Best.

@SamGG
Copy link

SamGG commented Oct 5, 2018

My current workaround is to create a directory in /static/images/tools and copy the images there.
In the help section I can write:
.. image:: ${static_path}/images/tools/my_super_tool/my_workflow_image.png
And the image is rendered.

@pjbriggs
Copy link

pjbriggs commented Oct 5, 2018

Hello @SamGG it's been a while since I had this problem but I think I used the same workaround as you, if this helps.

@SamGG
Copy link

SamGG commented Oct 5, 2018

Thanks for sharing. Hope this will be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants