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

Generating full documentation requires creating the example_thumbs first #2532

Closed
astrojuanlu opened this issue Mar 30, 2021 · 2 comments · Fixed by #2572
Closed

Generating full documentation requires creating the example_thumbs first #2532

astrojuanlu opened this issue Mar 30, 2021 · 2 comments · Fixed by #2572
Labels

Comments

@astrojuanlu
Copy link

astrojuanlu commented Mar 30, 2021

Hi! I am figuring out how to build seaborn docs on Read the Docs, which indeed requires some care. I almost have it, but I noticed a weird thing, perhaps because I'm doing something wrong.

The doc/README.md states that NB_KERNEL="python3 make notebooks html should work. However, this command produces this warning:

Running Sphinx v3.3.1                                                                                                                                                                                                               [108/1702]making output directory... done                                                                                        
/home/juanlu/Projects/RTD/migrate-rtd/seaborn/doc/conf.py:290: RemovedInSphinx40Warning: The app.add_javascript() is deprecated. Please use app.add_js_file() instead.
  app.add_javascript('copybutton.js')                                                                                  
/home/juanlu/Projects/RTD/migrate-rtd/seaborn/doc/conf.py:291: RemovedInSphinx40Warning: The app.add_stylesheet() is deprecated. Please use app.add_css_file() instead.
  app.add_stylesheet('style.css')                                                                                      
WARNING: html_static_path entry 'example_thumbs' does not exist

and then, even though the example_thumbs directory is next to the sources, the thumbnails are not present in _build/html (presumably because they were not there at the beginning of the build).

Then, running make html a second time fixes this, and all the thumbnails appear in _build/html/static.

Edit: it's enough with creating the example_thumbs directory first, see discussion below

Am I missing something? I assume this is either (a) something I'm doing wrong, (b) something you decided on purpose, despite being undocumented or (c) a necessary minor annoyance given the current workflow that did not make it to the README.

@mwaskom
Copy link
Owner

mwaskom commented Mar 30, 2021

This is probably just something I never noticed because make clean deletes everything in the directory but doesn't remove the directory itself, and it doesn't fail the doc build since sphinx only notifies at the warning level. Not sure what the best way to fix it would be.

@astrojuanlu
Copy link
Author

You're right (now I understood after your clarification), it's as simple as creating the example_thumbs directory first. Editing the issue title.

@astrojuanlu astrojuanlu changed the title Generating full documentation requires running make html twice Generating full documentation requires creating the example_thumbs first Mar 31, 2021
mwaskom added a commit that referenced this issue May 5, 2021
This is a little hacky, but including the thumbnail images in the build
seems otherwise complicated because they are written into raw html source
with an <img> tag, not using the sphinx image directive.

Fixes #2532
mwaskom added a commit that referenced this issue May 5, 2021
This is a little hacky, but including the thumbnail images in the build
seems otherwise complicated because they are written into raw html source
with an <img> tag, not using the sphinx image directive.

Fixes #2532
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.

2 participants