Skip to content

Commit

Permalink
DEV: Fail on Sphinx issues (#2405)
Browse files Browse the repository at this point in the history
This adds a code style check to avoid unexpectedly shipping docs/docstrings which cause issues.

Options (the long names are only part of the upcoming 7.3 release), based upon https://www.sphinx-doc.org/en/master/man/sphinx-build.html:

  * `-n`: Report warnings for missing references.
  * `-W`: Turn warnings into errors and stop at first violation.
  * `--keep-going`: Improve `-W` by collecting all violations and only failing at the end.
  * `-T`: Display the full traceback on actual errors.
  * `-b html`: Build HTML pages.
  * `docs`: Source directory.
  * `build/sphinx/html`: Target directory.
 
Fixes #2402
  • Loading branch information
stefan6419846 authored Jan 17, 2024
1 parent 0277352 commit 23a5a49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/github-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ jobs:
- name: Test with mypy
run : |
mypy pypdf
- name: Test docs build
run: |
pip install -r requirements/docs.txt
sphinx-build -n -W --keep-going -T -b html docs build/sphinx/html
package:
name: Build & verify package
Expand Down
5 changes: 5 additions & 0 deletions docs/modules/constants.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ Constants
:members:
:undoc-members:
:show-inheritance:

.. autoclass:: pypdf.constants.UserAccessPermissions
:members:
:undoc-members:
:show-inheritance:

0 comments on commit 23a5a49

Please sign in to comment.