From 73dcb927f0faadae963ad750305e62184b5d9440 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Sun, 25 Sep 2022 14:33:58 +0100 Subject: [PATCH] Fixed setup for spelling tests to be equal in tox.ini and GHA. * tox.ini now uses the same language (en_US) GHA already did. * tox.ini now turns warnings into errors as GHA already did. * Makefile: Had to remove replacement of en_US, so that language (used by GHA previously) can be used via Makefile. * Had to add several entries to the wordlist: I do no know how this ever has worked in GHA. (I got them before locally when calling `tox -e docs`.) Remaining difference: * tox.ini does not use `-q` so it is still possible to see the progress. --- .github/workflows/docs.yml | 4 +++- docs/Makefile | 6 +----- docs/spelling_wordlist | 6 ++++++ tox.ini | 3 +++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 9975a632bf..7c2b670b22 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -37,4 +37,6 @@ jobs: - name: Build docs run: | cd docs - sphinx-build -b spelling -n -q -W --keep-going -d _build/doctrees -D language=en_US -j auto . _build/spelling + export SPHINXOPTS="-q -W --keep-going -j auto" + export LANGUAGE=en_US + make spelling diff --git a/docs/Makefile b/docs/Makefile index 2b44830531..f175f89d51 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -14,14 +14,10 @@ ifndef LANGUAGE override LANGUAGE = en endif -# Convert something like "en_US" to "en", because Sphinx does not recognize -# underscores. Country codes should be passed using a dash, e.g. "pt-BR". -LANGUAGEOPT = $(firstword $(subst _, ,$(LANGUAGE))) - # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -n -d $(BUILDDIR)/doctrees -D language=$(LANGUAGEOPT) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +ALLSPHINXOPTS = -n -d $(BUILDDIR)/doctrees -D language=$(LANGUAGE) $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . diff --git a/docs/spelling_wordlist b/docs/spelling_wordlist index 0b9180fd35..2869b4d361 100644 --- a/docs/spelling_wordlist +++ b/docs/spelling_wordlist @@ -149,6 +149,7 @@ drilldown dropdown dropdowns Dunck +dz editability encodings Endian @@ -250,6 +251,7 @@ Kyngesburye Kyrgyz latin lawrence +lexer Libera lifecycle lifecycles @@ -349,6 +351,7 @@ pingback pingbacks Pinney Pinterest +pk plaintext pluggable pluralizations @@ -410,6 +413,7 @@ recomputation recursed redeclare redirections +Redis redisplay redisplayed redisplaying @@ -458,6 +462,7 @@ shapefiles sharding sitewide sliceable +Slocum SMTP solaris Sorani @@ -465,6 +470,7 @@ sortable Spectre Springmeyer SSL +st stacktrace stateful staticfile diff --git a/tox.ini b/tox.ini index 3b9f663385..cd088eadda 100644 --- a/tox.ini +++ b/tox.ini @@ -56,6 +56,9 @@ deps = pyenchant sphinxcontrib-spelling changedir = docs +setenv = + SPHINXOPTS=-W --keep-going -j auto + LANGUAGE=en_US commands = make spelling