-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-136155: Docs: check for EPUB fatal errors in CI #134074
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
@@ -512,6 +512,7 @@ | |||
|
|||
epub_author = 'Python Documentation Authors' | |||
epub_publisher = 'Python Software Foundation' | |||
epub_exclude_files = ('index.xhtml', 'download.xhtml') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference:
A sequence of files that are generated/copied in the build directory but should not be included in the EPUB file.
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-epub_exclude_files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good.
We'll need to wait for #136155 (comment) / sphinx-doc/sphinxext-opengraph#136 / sphinx-doc/sphinxext-opengraph#137 to be fixed before merging.
But they're taking some time. Until sphinxext-opengraph is fixed and released, is it useful to log these errors in CI, without failing? Or shall we wait a bit longer?
@@ -75,6 +75,17 @@ jobs: | |||
--fail-if-regression \ | |||
--fail-if-improved \ | |||
--fail-if-new-news-nit | |||
- name: 'Build EPUB documentation and load EPUB checks to file' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: 'Build EPUB documentation and load EPUB checks to file' | |
- name: 'Build EPUB documentation' |
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet" epub | ||
pip install epubcheck | ||
epubcheck Doc/build/epub/Python.epub &> Doc/epubcheck.txt | ||
- name: 'Check for FATAL errors in EPUB' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: 'Check for FATAL errors in EPUB' | |
- name: 'Check for fatal errors in EPUB' |
Would it be worth to add |
As a custom file? Probably not, because it would only be for the short term. Unlike |
Validate EPUB documentation for not having warnings with level
FATAL
when running EPUBCheck in the CI.This should prevent issues similar to #136155 in the future.
The check will pass after rebase on #136187 merged to the main branch.