From e3e749fa30f185861d12dbf953881d4372a853f0 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 1 Feb 2017 17:02:18 +0100 Subject: [PATCH] doc: verify all rst files Make use of doc8 to verify all rst files which are not autogenerated for errors and fail if there are any issues found. The doc8 checks are now part of the tox 'docs' environment and ran automatically. Checks can also be called direcly via 'tox -e docs'. Fix all issues found by doc8. Closes-Bug: #1566765 Change-Id: I2b25247030a1aadcfe029c9e071ef17f2f72046b Signed-off-by: Danny Al-Gaaf --- doc/README.rst | 4 ++-- doc/source/devref/attach_detach_conventions_v2.rst | 9 +++++---- rally-jobs/plugins/README.rst | 2 +- test-requirements.txt | 1 + tox.ini | 1 + 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/README.rst b/doc/README.rst index a2d171d1a..9c698bcbe 100644 --- a/doc/README.rst +++ b/doc/README.rst @@ -14,8 +14,8 @@ Tools Sphinx The Python Sphinx package is used to generate the documentation output. Information on Sphinx, including formatting information for RST source - files, can be found in the `Sphinx online documentation - `_. + files, can be found in the + `Sphinx online documentation `_. Graphviz Some of the diagrams are generated using the ``dot`` language diff --git a/doc/source/devref/attach_detach_conventions_v2.rst b/doc/source/devref/attach_detach_conventions_v2.rst index 891e0d709..7686f62e4 100644 --- a/doc/source/devref/attach_detach_conventions_v2.rst +++ b/doc/source/devref/attach_detach_conventions_v2.rst @@ -60,10 +60,11 @@ will create the attachment and perform the update on the attachment to set the connector info and return the connection data needed to make a connection. The attachment_create call can be used in one of two ways: -1. Create an empty Attachment object (reserve) - attachment_create call. In this case the attachment_create call requires - an instance_uuid and a volume_uuid, and just creates an empty attachment - object and returns the UUID of said attachment to the caller. + +1. Create an empty Attachment object (reserve) attachment_create call. In this + case the attachment_create call requires an instance_uuid and a volume_uuid, + and just creates an empty attachment object and returns the UUID of said + attachment to the caller. 2. Create and Complete the Attachment process in one call. The Reserve process is only needed in certain cases, in many cases Nova actually has enough diff --git a/rally-jobs/plugins/README.rst b/rally-jobs/plugins/README.rst index 33bec0d25..3aa58df22 100644 --- a/rally-jobs/plugins/README.rst +++ b/rally-jobs/plugins/README.rst @@ -1,7 +1,7 @@ Rally plugins ============= -All *.py modules from this directory will be auto-loaded by Rally and all +All ``*.py`` modules from this directory will be auto-loaded by Rally and all plugins will be discoverable. There is no need of any extra configuration and there is no difference between writing them here and in rally code base. diff --git a/test-requirements.txt b/test-requirements.txt index 45b50a624..0b6d958fd 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -25,3 +25,4 @@ os-testr>=0.8.0 # Apache-2.0 tempest>=12.1.0 # Apache-2.0 bandit>=1.1.0 # Apache-2.0 reno>=1.8.0 # Apache-2.0 +doc8 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 9b412aab0..2b3d81354 100644 --- a/tox.ini +++ b/tox.ini @@ -98,6 +98,7 @@ commands = python setup.py build_sphinx rm -rf api-ref/build sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html/ + doc8 --ignore D001 --ignore-path .tox --ignore-path cinder.egg-info --ignore-path doc/src/api --ignore-path doc/source/drivers.rst --ignore-path doc/build -e txt -e rst whitelist_externals = rm [testenv:gendriverlist]