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

Add sphinx.ext.imgconverter extension to make SVGs build in LateX #240

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

clelange
Copy link
Collaborator

@clelange clelange commented Oct 20, 2023

Docs are failing to build because there's no SVG support, see an example log at https://readthedocs.org/api/v2/build/22295173.txt

This is an attempt to fix the issue, following sphinx-doc/sphinx#1907


📚 Documentation preview 📚: https://hepdata-lib--240.org.readthedocs.build/en/240/

@GraemeWatt
Copy link
Member

Sorry, I only checked the Sphinx build locally using make html and not the other formats. For pull requests, "Additional formats like PDF and EPUB aren’t built, to reduce build time.". I checked that I can locally run make latexpdf successfully after your fix to add sphinx.ext.imgconverter. Running make epub gives a warning message "WARNING: unknown mimetype for .nojekyll, ignoring" (also seen at the bottom of the build log). This can be suppressed by adding suppress_warnings = ['epub.unknown_project_files'] to docs/conf.py (see sphinx-doc/sphinx#3214). I guess the new "Building the documentation" section in docs/dev.rst should mention that the developer should check the Sphinx build locally with make latexpdf and make epub. Alternatively, if only HTML documentation is needed, the formats: all line could simply be removed from .readthedocs.yml.

@clelange
Copy link
Collaborator Author

Thanks for the suggestions @GraemeWatt -- I've now also suppressed the epub .nojekyll warning and added a note on testing LateX and epub docs. I think it might still be useful to build those two versions in addition to HTML.

@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2023

Codecov Report

Merging #240 (ea0e451) into main (8dcf6a1) will not change coverage.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##             main     #240   +/-   ##
=======================================
  Coverage   88.54%   88.54%           
=======================================
  Files           4        4           
  Lines         978      978           
  Branches      203      203           
=======================================
  Hits          866      866           
  Misses         82       82           
  Partials       30       30           
Flag Coverage Δ
unittests-3.10 88.54% <ø> (ø)
unittests-3.6 88.21% <ø> (ø)
unittests-3.7 88.21% <ø> (ø)
unittests-3.8 88.34% <ø> (ø)
unittests-3.9 88.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@clelange clelange merged commit 7f7a07c into HEPData:main Nov 15, 2023
12 checks passed
@clelange clelange deleted the svg_readthedocs branch November 15, 2023 10:18
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

Successfully merging this pull request may close these issues.

3 participants