From 888dcd4372f0f2e0c2ca60e8a945cf1a2459404b Mon Sep 17 00:00:00 2001 From: "Jay S. Bryant" Date: Mon, 28 Aug 2017 23:43:47 -0500 Subject: [PATCH] [Doc] Handle Sphinx warnings as errors We should be treating warnings from Sphinx as errors as they usually result in bad HTML output. Now that we have all of the existing warnings resolved we want to turn on this option so that more bad docstrings, etc. do not get merged. One last bad docstring appears to have snuck in. This patch also fixes that docstring problem in cinder/volume/qos_specs.py . We have a requirement on graphviz that was never handled and is actually causing one of our web pages to be improperly rendered. The patch adds the dependency to bindep.txt so that we do not see a check failure and so the documentation builds properly. Change-Id: I66a9282b63d884a390534b0c777be8433a7e9bb3 --- bindep.txt | 1 + cinder/volume/qos_specs.py | 12 ++++++------ setup.cfg | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bindep.txt b/bindep.txt index 22a288467ff..b196c8fff63 100644 --- a/bindep.txt +++ b/bindep.txt @@ -4,6 +4,7 @@ build-essential [platform:dpkg test] gcc [platform:rpm test] gettext [!platform:suse] gettext-runtime [platform:suse] +graphviz [test] libffi-dev [platform:dpkg] libffi-devel [platform:redhat] libffi48-devel [platform:suse] diff --git a/cinder/volume/qos_specs.py b/cinder/volume/qos_specs.py index 4e334e7de1d..a86fe109bbe 100644 --- a/cinder/volume/qos_specs.py +++ b/cinder/volume/qos_specs.py @@ -40,13 +40,13 @@ def create(context, name, specs=None): Expected format of the input parameter: - .. code-block:: json + .. code-block:: python - { - 'consumer': 'front-end', - 'total_iops_sec': 1000, - 'total_bytes_sec': 1024000 - } + { + 'consumer': 'front-end', + 'total_iops_sec': 1000, + 'total_bytes_sec': 1024000 + } """ # Validate the key-value pairs in the qos spec. diff --git a/setup.cfg b/setup.cfg index 723823b5599..6a519e39808 100644 --- a/setup.cfg +++ b/setup.cfg @@ -75,6 +75,7 @@ tempest.test_plugins = [build_sphinx] all_files = 1 +warning-is-error = 1 build-dir = doc/build source-dir = doc/source