Add optional spell checker target
Add a tox target using sphinxcontrib-spelling to let authors run a spell checker against documents before submitting them. Based on nova-specs change: If519fb63bc4b0923a48df9e0435125fd66ab5c0c Change-Id: I5b5bb10fada71c14ae1753e72a450e16d0683cb0
This commit is contained in:
@@ -30,9 +30,17 @@ extensions = ['sphinx.ext.autodoc',
|
|||||||
'sphinx.ext.intersphinx',
|
'sphinx.ext.intersphinx',
|
||||||
'sphinx.ext.todo',
|
'sphinx.ext.todo',
|
||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
'oslosphinx'
|
'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
|
||||||
|
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
7
tox.ini
7
tox.ini
@@ -14,3 +14,10 @@ commands = {posargs}
|
|||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
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
|
||||||
|
Reference in New Issue
Block a user