From d18e847c942ec782bc11016a698f998e85dd6d36 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Tue, 18 Jul 2017 23:28:18 +0000 Subject: [PATCH] Turn on warning-is-error in doc build * Fixes warnings in RST file * Suppress warning log from pyeclib during the doc build. pyeclib emits a warning message on an older liberasurecode [1] and sphinx treats this as error (when warning-is-error is set). There is no need to check warnings during the doc build, so we can safely suppress the warning. This is a part of the doc migration community-wide effort. http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html [1] https://github.com/openstack/pyeclib/commit/d163972b Change-Id: I9adaee29185a2990cc3985bbe0dd366e22f4f1a2 --- doc/source/conf.py | 10 ++++++++++ doc/source/howto_installmultinode.rst | 4 ++-- setup.cfg | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index bc260c1bbe..922ad33dd5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,10 +27,20 @@ # serve to show the default. import datetime +import logging import os from swift import __version__ import sys +# NOTE(amotoki): Our current doc build job uses an older version of +# liberasurecode which comes from Ubuntu 16.04. +# pyeclib emits a warning message if liberasurecode <1.3.1 is used [1] and +# this causes the doc build failure if warning-is-error is enabled in Sphinx. +# As a workaround we suppress the warning message from pyeclib until we use +# a newer version of liberasurecode in our doc build job. +# [1] https://github.com/openstack/pyeclib/commit/d163972b +logging.getLogger('pyeclib').setLevel(logging.ERROR) + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. diff --git a/doc/source/howto_installmultinode.rst b/doc/source/howto_installmultinode.rst index 4116d8bac3..af5b45194d 100644 --- a/doc/source/howto_installmultinode.rst +++ b/doc/source/howto_installmultinode.rst @@ -10,6 +10,6 @@ Current Install Guides ---------------------- * `Object Storage installation guide for OpenStack Ocata - `__ + `__ * `Object Storage installation guide for OpenStack Newton - `__ + `__ diff --git a/setup.cfg b/setup.cfg index 938bd82d08..16342f199b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -105,6 +105,7 @@ paste.filter_factory = all_files = 1 build-dir = doc/build source-dir = doc/source +warning-is-error = 1 [egg_info] tag_build =