diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..7ddda55 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,5 @@ +sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD +sphinxcontrib-httpdomain>=1.3.0 # BSD +sphinxcontrib-pecanwsme>=0.8.0 # Apache-2.0 +openstackdocstheme>=1.30.0 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 diff --git a/doc/source/contributor/creating_custom_actions.rst b/doc/source/contributor/creating_custom_actions.rst index fa63e96..23ba57d 100644 --- a/doc/source/contributor/creating_custom_actions.rst +++ b/doc/source/contributor/creating_custom_actions.rst @@ -34,7 +34,8 @@ How to write a Custom Action mistral.actions = example.runner = my.mistral_plugins.somefile:RunnerAction -3. Reinstall your library package if it was installed in system (not in virtualenv). +3. Reinstall your library package if it was installed in system + (not in virtualenv). 4. Run db-sync tool to ensure your actions are in Mistral's database diff --git a/lower-constraints.txt b/lower-constraints.txt index 7f5846f..6690033 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -4,6 +4,7 @@ Babel==2.3.4 coverage==4.0 debtcollector==1.2.0 docutils==0.11 +doc8==0.6.0 dulwich==0.15.0 eventlet==0.20.0 extras==1.0.0 diff --git a/test-requirements.txt b/test-requirements.txt index ff76531..5d5d532 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,12 +3,10 @@ # process, which may cause wedges in the gate later. hacking>=1.1.0 # Apache-2.0 +doc8>=0.6.0 # Apache-2.0 +Pygments>=2.2.0 # BSD license coverage!=4.4,>=4.0 # Apache-2.0 -sphinx>=1.8.0,<2.0.0;python_version=='2.7' # BSD -sphinx>=1.8.0,!=2.1.0;python_version>='3.4' # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT -# releasenotes -reno>=2.5.0 # Apache-2.0 + diff --git a/tox.ini b/tox.ini index 58f642f..e24ca85 100644 --- a/tox.ini +++ b/tox.ini @@ -25,7 +25,7 @@ whitelist_externals = [testenv:pep8] commands = - python setup.py check --restructuredtext --strict + doc8 doc/source flake8 {posargs} [testenv:venv] @@ -41,11 +41,13 @@ commands = coverage xml -o cover/coverage.xml [testenv:docs] -commands = python setup.py build_sphinx +deps = -r{toxinidir}/doc/requirements.txt +setenv = PYTHONHASHSEED=0 +commands = + rm -rf doc/build + sphinx-build -E -W --keep-going -b html doc/source doc/build/html [testenv:releasenotes] -whitelist_externals = - rm commands = rm -rf releasenotes/build sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html @@ -54,9 +56,13 @@ commands = whitelist_externals = oslo_debug_helper commands = oslo_debug_helper -t mistral_lib/tests {posargs} +[doc8] +extensions = .rst, .yaml, .mistral +# Maximal line length should be 80. +max-line-length = 80 + [flake8] # E123, E125 skipped as they are invalid PEP-8. - show-source = True ignore = E123,E125,W504 builtins = _