From c7989eb0581fdae594a6c6d078d2a635ccc7b2ab Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Wed, 2 Nov 2022 19:24:35 +0000 Subject: [PATCH] Turn all warnings into errors when building website Drop code target, sphinx-autogen is not using conf.py, and since Sphinx 4.0 autosummary is generating stub pages by default anyway. Mock ctypes and linkcheck.__main__: colorama.py imports MS Windows libraries, autosummary executes __main__.py. --- .github/workflows/build.yml | 1 - .github/workflows/publish-pages.yml | 1 - doc/Makefile | 5 +---- doc/documentation.md | 5 ----- doc/src/Makefile | 2 +- doc/src/conf.py | 2 ++ 6 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aef7b5a..386b7d97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -111,7 +111,6 @@ jobs: - name: Build run: | python3 -m hatchling build -t sdist --hooks-only - make -C doc code make -C doc html make -C doc locale make -C doc man diff --git a/.github/workflows/publish-pages.yml b/.github/workflows/publish-pages.yml index 6eef09e2..09693569 100644 --- a/.github/workflows/publish-pages.yml +++ b/.github/workflows/publish-pages.yml @@ -36,7 +36,6 @@ jobs: - name: Build run: | python3 -m hatchling build -t sdist --hooks-only - make -C doc code make -C doc html - name: Publish diff --git a/doc/Makefile b/doc/Makefile index c8551a9a..84cad6c3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -3,10 +3,7 @@ LOCALES:=en de all: html man -code: clean - python3 -m sphinx.ext.autosummary.generate src/code/index.rst - -html: +html: clean make -C src html locale: diff --git a/doc/documentation.md b/doc/documentation.md index d21ec788..35513f8c 100644 --- a/doc/documentation.md +++ b/doc/documentation.md @@ -44,11 +44,6 @@ Published man pages are included in the LinkChecker repository. HTML ---- -``doc/src/code/index.rst`` gives an overview of the LinkChecker code, optionally a navigable -copy of the LinkChecker source can be created with: - -``linkchecker/doc $ make code`` - Build the HTML files with: ``linkchecker/doc $ make html`` diff --git a/doc/src/Makefile b/doc/src/Makefile index 518ea611..f9704da3 100644 --- a/doc/src/Makefile +++ b/doc/src/Makefile @@ -1,6 +1,6 @@ # You can set these variables from the command line, and also # from the environment for the first two. -SPHINXOPTS ?= +SPHINXOPTS ?= -W --keep-going SPHINXBUILD ?= python3 -m sphinx.cmd.build SPHINXINTL ?= python3 -m sphinx_intl.commands SOURCEDIR = . diff --git a/doc/src/conf.py b/doc/src/conf.py index 0476dcdb..baf85226 100644 --- a/doc/src/conf.py +++ b/doc/src/conf.py @@ -78,6 +78,8 @@ autodoc_member_order = 'groupwise' autosectionlabel_prefix_document = True +autosummary_mock_imports = ['ctypes', 'linkcheck.__main__'] + extlinks = {'pypi': ('https://pypi.org/project/%s/', '%s')} graphviz_output_format = 'svg'