From a597136e8a61a4492d81696a6cdda4492d51a3ee Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 14 Jul 2017 10:06:41 -0400 Subject: [PATCH] turn on warning-is-error for doc builds Turn on the flag in setup.cfg. Fix some formatting issues with a couple of docstrings. Fix some mistakes in the rst files. Suppress warnings from Sphinx extensions that used to be suppressed by pbr with older versions of Sphinx. Change-Id: I549292b5e22cf8ae0f54f878793a36f2cd3b8e6c Signed-off-by: Doug Hellmann --- aodh/notifier/zaqar.py | 6 +++--- doc/source/conf.py | 8 ++++++++ doc/source/contributor/architecture.rst | 2 -- doc/source/contributor/configuration.rst | 2 +- setup.cfg | 1 + 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/aodh/notifier/zaqar.py b/aodh/notifier/zaqar.py index e59df36db..e3a30a9a6 100644 --- a/aodh/notifier/zaqar.py +++ b/aodh/notifier/zaqar.py @@ -40,17 +40,17 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier): to an existing Zaqar queue with a pre-signed URL. To create a new subscription in the service project, use a notification URL - of the form: + of the form:: zaqar://?topic=example&subscriber=mailto%3A//test%40example.com&ttl=3600 - Multiple subscribers are allowed. ``ttl` is the time to live of the + Multiple subscribers are allowed. ``ttl`` is the time to live of the subscription. The queue will be created automatically, in the service project, with a name based on the topic and the alarm ID. To use a pre-signed URL for an existing queue, use a notification URL with the scheme ``zaqar://`` and the pre-signing data from Zaqar in the query - string: + string:: zaqar://?queue_name=example&project_id=foo& paths=/messages&methods=POST&expires=1970-01-01T00:00Z& diff --git a/doc/source/conf.py b/doc/source/conf.py index 47e7ba6a9..cb324a752 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -321,3 +321,11 @@ epub_copyright = u'2012-2015, OpenStack' # Allow duplicate toc entries. #epub_tocdup = True + +# NOTE(dhellmann): pbr used to set this option but now that we are +# using Sphinx>=1.6.2 it does not so we have to set it ourselves. +suppress_warnings = [ + 'app.add_directive', 'app.add_role', + 'app.add_generic_role', 'app.add_node', + 'image.nonlocal_uri', +] diff --git a/doc/source/contributor/architecture.rst b/doc/source/contributor/architecture.rst index 63bde2ac5..126ff93b8 100644 --- a/doc/source/contributor/architecture.rst +++ b/doc/source/contributor/architecture.rst @@ -4,8 +4,6 @@ System Architecture ===================== -.. index:: - High-Level Architecture ======================= diff --git a/doc/source/contributor/configuration.rst b/doc/source/contributor/configuration.rst index 3108ed88a..70de84866 100644 --- a/doc/source/contributor/configuration.rst +++ b/doc/source/contributor/configuration.rst @@ -33,4 +33,4 @@ The following is a sample Aodh configuration for adaptation and use. It is auto-generated from Aodh when this documentation is built, and can also be viewed in `file form <_static/aodh.conf.sample>`_. -.. literalinclude:: _static/aodh.conf.sample +.. literalinclude:: ../_static/aodh.conf.sample diff --git a/setup.cfg b/setup.cfg index 3b0556a82..76a78a869 100644 --- a/setup.cfg +++ b/setup.cfg @@ -126,6 +126,7 @@ tempest.test_plugins = all_files = 1 build-dir = doc/build source-dir = doc/source +warning-is-error = 1 [pbr] warnerrors = true