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

0.10.0 breaks sphinx_gallery.load_style #878

Closed
pmeier opened this issue Nov 6, 2021 · 2 comments · Fixed by #880
Closed

0.10.0 breaks sphinx_gallery.load_style #878

pmeier opened this issue Nov 6, 2021 · 2 comments · Fixed by #880
Labels

Comments

@pmeier
Copy link
Contributor

pmeier commented Nov 6, 2021

I'm using an exotic setup where the gallery built requires GPUs and thus cannot be run by RTD or the like (see #704) for details. I have a built server set up that builds the galleries and packages them, whereas the normal CI falls back to downloading these pre-built galleries. For that to work, the built server runs with sphinx_gallery.gen_gallery whereas the normal CI runs with sphinx_gallery.load_style.

This worked fine until 0.9.0. With 0.10.0 images scraped with the default matplotlib scraper now use the .. image-sg:: introduced in #808. Unfortunately, this directive is not loaded when using sphinx_gallery.load_style. You end up with warnings like these:

.. image-sg:: /galleries/examples/beginner/images/sphx_glr_example_nst_without_pystiche_003.png
   :alt: Input image
   :srcset: /galleries/examples/beginner/images/sphx_glr_example_nst_without_pystiche_003.png
   :class: sphx-glr-single-img
/home/philip/git/pystiche/pystiche/docs/source/galleries/examples/beginner/example_nst_without_pystiche.rst:1305: WARNING: Unknown directive type "image-sg".

The build goes through, but the images are not shown in the HTML version.

@pmeier
Copy link
Contributor Author

pmeier commented Nov 7, 2021

Here are two RTD builds, that for the purpose of this issue only differ in the sphinx-gallery version:

@larsoner
Copy link
Contributor

larsoner commented Nov 8, 2021

@pmeier I think we need to add the directive when doing load-style. Could you make a PR to fix it?

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

Successfully merging a pull request may close this issue.

3 participants