Add optional spell checker target

Add a tox target using sphinxcontrib-spelling to let
authors run a spell checker against documents before
submitting them.

Change-Id: If519fb63bc4b0923a48df9e0435125fd66ab5c0c
This commit is contained in:
Doug Hellmann 2014-04-16 12:39:12 -07:00
parent 2cb8d8b486
commit 78397ebea2
2 changed files with 15 additions and 1 deletions

View File

@ -26,6 +26,14 @@ extensions = [
'oslosphinx'
]
# Optionally allow the use of sphinxcontrib.spelling to verify the
# spelling of the documents.
try:
import sphinxcontrib.spelling
extensions.append('sphinxcontrib.spelling')
except ImportError:
pass
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable

View File

@ -11,9 +11,15 @@ setenv =
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands = python setup.py build_sphinx
[testenv:spelling]
deps =
-r{toxinidir}/requirements.txt
sphinxcontrib-spelling
PyEnchant
commands = sphinx-build -b spelling doc/source doc/build/spelling