Skip to content

Commit

Permalink
Use Sphinx 1.5 warning-is-error
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ajaeger committed Mar 8, 2017
1 parent 2751ab9 commit 4cff2ab
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@
# 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
Expand Down
2 changes: 1 addition & 1 deletion doc/source/deploy/drivers.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _drivers:
.. _enabling_drivers:

================
Enabling drivers
Expand Down
2 changes: 1 addition & 1 deletion doc/source/dev/drivers.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _drivers:
.. _pluggable_drivers:

=================
Pluggable Drivers
Expand Down
2 changes: 0 additions & 2 deletions doc/source/dev/governance.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _faq:

===========================
Ironic Governance Structure
===========================
Expand Down
2 changes: 0 additions & 2 deletions doc/source/dev/releasing.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _faq:

=========================
Releasing Ironic Projects
=========================
Expand Down
16 changes: 15 additions & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <deploy/user-guide.html>`_
:doc:`An introduction to ironic's conceptual architecture <deploy/user-guide>`
is available for those new to the project.

Site Notes
Expand Down Expand Up @@ -166,6 +166,7 @@ of ironic that may or may not be suitable to every situation.
Emitting software metrics <deploy/metrics>
Auditing API Traffic <deploy/api-audit-support>
Notifications <deploy/notifications>
Ceph Object Gateway support <deploy/radosgw>
Configuration Reference <http://docs.openstack.org/draft/config-reference/bare-metal.html>
Sample configuration file <https://git.openstack.org/cgit/openstack/ironic/tree/etc/ironic/ironic.conf.sample>

Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 4cff2ab

Please sign in to comment.