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

Does nbgallery work with nbsphinx_execute = "never" #586

Closed
astrojuanlu opened this issue Jul 17, 2021 · 5 comments
Closed

Does nbgallery work with nbsphinx_execute = "never" #586

astrojuanlu opened this issue Jul 17, 2021 · 5 comments

Comments

@astrojuanlu
Copy link

During the SciPy 2021 sprints, we were trying at sktime/sktime#1158 to create a gallery of tutorials using .. nbgallery. This project has nbsphinx_execute = "never" because the notebooks take a lot of time, but the outputs are stored in the notebooks.

However, when running the documentation, the output looks like a .. toctree directive with a higher depth:

https://sktime--1158.org.readthedocs.build/en/1158/tutorials.html

Screenshot 2021-07-17 at 17-15-55 Tutorials — sktime documentation

We even tried to set the thumbnails explicitly (see sktime/sktime@968c8be).

If we switch nbsphinx_execute = "always" and test with only 1 notebook, we get the expected result:

Screenshot 2021-07-17 at 17-18-17 Tutorials — sktime documentation

Is there a way to make the gallery work without executing the notebooks? cc @mloning

@mgeier
Copy link
Member

mgeier commented Jul 19, 2021

Thanks for the report!

This is strange though, because whether or not the notebooks are executed shouldn't have an influence on them being part of a gallery.

I've just tried using nbsphinx_execute = 'never' in nbsphinx's own docs, and the galleries are shown as expected, with the missing thumbnails replaced by a generic "broken" thumbnail.
When I pre-execute the notebooks and save them with outputs, it also works as expected.

I think this is something where a minimal reproducible example would help shed light on the problem.

The Sphinx build produces a s***load of warnings (669 to be concrete, see https://readthedocs.org/projects/sktime/builds/14263292/), so I wouldn't be surprised if there is some unexpected behavior. Maybe one of those warnings explains the observed behavior?

@astrojuanlu
Copy link
Author

Hmmm maybe. So, if the answer is "yes, it should work", let me close this issue and we can investigate more and come with a more specific problem. I agree with you, the number of warnings is just too high.

Thanks @mgeier ! 🙌🏽

@mloning
Copy link

mloning commented Jul 20, 2021

Thanks @mgeier and @astrojuanlu - yes let's try to sort out our sphinx builds first! 👍

@mloning
Copy link

mloning commented Jul 28, 2021

Please see sktime/sktime#1158 (comment)

@mgeier
Copy link
Member

mgeier commented Jul 29, 2021

See #588.

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

No branches or pull requests

3 participants