Skip to content

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

m-aciek
Copy link
Contributor

@m-aciek m-aciek commented May 15, 2025

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.

m-aciek referenced this pull request in python/python-docs-pl May 16, 2025
@m-aciek m-aciek changed the title Docs EPUB: check in CI Docs EPUB: check fatal errors in CI Jul 1, 2025
@m-aciek m-aciek changed the title Docs EPUB: check fatal errors in CI gh-136155: Docs: check for EPUB fatal errors in CI Jul 1, 2025
@m-aciek m-aciek marked this pull request as ready for review July 1, 2025 23:02
Copy link
Member

@hugovk hugovk left a 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')
Copy link
Member

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

Copy link
Member

@hugovk hugovk left a 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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: 'Check for FATAL errors in EPUB'
- name: 'Check for fatal errors in EPUB'

@m-aciek
Copy link
Contributor Author

m-aciek commented Jul 11, 2025

Would it be worth to add .epubcheckignore listing eight failing files?

@hugovk
Copy link
Member

hugovk commented Jul 11, 2025

As a custom file? Probably not, because it would only be for the short term. Unlike .nitignore, we cannot have any fatal errors or the EPUB is broken.

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

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy