Skip to content

Commit

Permalink
[doc] Add a CI check for the doc being properly generated (#6736)
Browse files Browse the repository at this point in the history
And cleanup the doc about dev installation for contributors.

Co-authored-by: Jacob Walls <[email protected]>
  • Loading branch information
Pierre-Sassoulas and jacobtylerwalls authored Aug 15, 2023
1 parent 466fb76 commit f40e9ff
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,8 @@ jobs:
run: |
. venv/bin/activate
cd doc
make html
pre-commit run --hook-stage push sphinx-generated-doc --all-files || {
git diff ; \
echo "Make sure that there are no modifications locally when launching 'make html'" ; \
exit 1; \
}
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ repos:
args: ["-rn", "-sn", "--rcfile=pylintrc", "--fail-on=I", "--spelling-dict=en"]
exclude: tests(/\w*)*/functional/|tests/input|tests(/\w*)*data/|doc/
stages: [manual]
- id: sphinx-generated-doc
alias: sphinx-generated-doc
name: sphinx-generated-doc
entry: make -C doc/ html
pass_filenames: false
language: system
stages: [push]
- id: check-newsfragments
name: Check newsfragments
entry: python3 -m script.check_newsfragments
Expand Down
4 changes: 4 additions & 0 deletions doc/development_guide/contributor_guide/tests/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ This ensures your testing environment is similar to Pylint's testing environment
pre-commit hooks which should take care of the autoformatting for you before each
commit. To enable it, run ``pre-commit install`` in the ``pylint`` root directory.

**Even more optionally**: You can enable slow on push hooks with ``pre-commit install --install-hooks -t pre-push``.
It will do slow checks like checking that the generated documentation is up to date
before each push.

Astroid installation
--------------------

Expand Down

0 comments on commit f40e9ff

Please sign in to comment.