From 4cff2ab6d56b01431d52a067aa415d3d0f14f404 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Sat, 4 Mar 2017 19:11:26 +0100 Subject: [PATCH] Use Sphinx 1.5 warning-is-error With pbr 2.0 and Sphinx 1.5, the setting for treat sphinx warnings as errors is setting warning-is-error in build_sphinx section. Migrate the setting from the old warnerrors one. Fix problems found: * Duplicate labels (rename wrong faq entries, rename unused drivers entries) * Add api/autoindex.rst as hidden to the index so that we do not get a warning. The modindex includes the same content, so no need to show this. * Add releasenotes/index.rst, webapi/v1.rst, user-guide, and install-guide.rst to hidden index since they're not listed in index on purpose, so sphinx will not warn that they do not appear in a toc * Add deploy/radosgw to index * ignore app.add_directiv warning * Fix reference to user-guide to use proper markup so that Sphinx knows the user-guide is referenced. Change-Id: I00d249229d4d31ba36d4393d60847fdb1513a744 --- doc/source/conf.py | 5 +++++ doc/source/deploy/drivers.rst | 2 +- doc/source/dev/drivers.rst | 2 +- doc/source/dev/governance.rst | 2 -- doc/source/dev/releasing.rst | 2 -- doc/source/index.rst | 16 +++++++++++++++- setup.cfg | 2 +- 7 files changed, 23 insertions(+), 8 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index bfbff5556..9c28b3f33 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -79,6 +79,11 @@ for module in MOCK_MODULES: # source directory, using slashes as directory separators on all platforms. exclude_patterns = ['api/ironic_tempest_plugin.*'] +# Ignore the following warning: WARNING: while setting up extension +# wsmeext.sphinxext: directive 'autoattribute' is already registered, +# it will be overridden. +suppress_warnings = [ 'app.add_directive'] + # -- Options for HTML output -------------------------------------------------- # The theme to use for HTML and HTML Help pages. Major themes that come with diff --git a/doc/source/deploy/drivers.rst b/doc/source/deploy/drivers.rst index 56a286a6c..4774a799e 100644 --- a/doc/source/deploy/drivers.rst +++ b/doc/source/deploy/drivers.rst @@ -1,4 +1,4 @@ -.. _drivers: +.. _enabling_drivers: ================ Enabling drivers diff --git a/doc/source/dev/drivers.rst b/doc/source/dev/drivers.rst index d2f4aee41..d7a5e88a9 100644 --- a/doc/source/dev/drivers.rst +++ b/doc/source/dev/drivers.rst @@ -1,4 +1,4 @@ -.. _drivers: +.. _pluggable_drivers: ================= Pluggable Drivers diff --git a/doc/source/dev/governance.rst b/doc/source/dev/governance.rst index dffb877b1..a74d73cb0 100644 --- a/doc/source/dev/governance.rst +++ b/doc/source/dev/governance.rst @@ -1,5 +1,3 @@ -.. _faq: - =========================== Ironic Governance Structure =========================== diff --git a/doc/source/dev/releasing.rst b/doc/source/dev/releasing.rst index e504fb0fd..54c14654a 100644 --- a/doc/source/dev/releasing.rst +++ b/doc/source/dev/releasing.rst @@ -1,5 +1,3 @@ -.. _faq: - ========================= Releasing Ironic Projects ========================= diff --git a/doc/source/index.rst b/doc/source/index.rst index 87572fbb4..a4588b034 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -16,7 +16,7 @@ with a unified interface to a heterogeneous fleet of servers while also providing the Compute service with an interface that allows physical servers to be managed as though they were virtual machines. -`An introduction to ironic's conceptual architecture `_ +:doc:`An introduction to ironic's conceptual architecture ` is available for those new to the project. Site Notes @@ -166,6 +166,7 @@ of ironic that may or may not be suitable to every situation. Emitting software metrics Auditing API Traffic Notifications + Ceph Object Gateway support Configuration Reference Sample configuration file @@ -210,3 +211,16 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` + +.. # NOTE(jaegerandi): This is where we hide things that we don't want + # shown in the top level table of contents. api/autoindex is hidden + # since it's in the modindex link above. + # deploy/user-guide is referenced above but not in a toctree. +.. toctree:: + :hidden: + + api/autoindex + deploy/install-guide.rst + deploy/user-guide.rst + releasenotes/index + webapi/v1.rst diff --git a/setup.cfg b/setup.cfg index eba73c353..587110225 100644 --- a/setup.cfg +++ b/setup.cfg @@ -153,12 +153,12 @@ autodoc_exclude_modules = ironic.db.sqlalchemy.alembic.env ironic.db.sqlalchemy.alembic.versions.* ironic_tempest_plugin.* -warnerrors = True [build_sphinx] all_files = 1 build-dir = doc/build source-dir = doc/source +warning-is-error = 1 [egg_info] tag_build =