From 500992b37dfd2d03cc02c55440fb17a74e9ed40b Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 3 Apr 2017 14:28:24 -0700 Subject: [PATCH] Cleanup docs builds and error on warnings The docs builds throw quite a few exceptions and warnings. Most of this is due to code that has moved around so autodoc can't import code to document that code. Update the names for code that has moved. There were also so small docstring indentation issues that are corrected. In addition to fixing these issues, update the minimum version of sphinx and set warning-is-error so that we avoid these problems in the future by gating on making sure they don't exist. Change-Id: Ic06775e7d1c8fbbfc5a8e6c412a2ad15f8699413 --- doc/source/developer/datamodel.rst | 5 ++--- doc/source/developer/testing.rst | 2 +- setup.cfg | 1 + test-requirements.txt | 2 +- tests/base.py | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/source/developer/datamodel.rst b/doc/source/developer/datamodel.rst index 9df6505817..2996ff4104 100644 --- a/doc/source/developer/datamodel.rst +++ b/doc/source/developer/datamodel.rst @@ -26,12 +26,12 @@ A :py:class:`~zuul.model.Pipeline` has one or more A :py:class:`~zuul.model.Job` represents the definition of what to do. A :py:class:`~zuul.model.Build` represents a single run of a -:py:class:`~zuul.model.Job`. A :py:class:`~zuul.model.JobTree` is used to +:py:class:`~zuul.model.Job`. A :py:class:`~zuul.model.JobGraph` is used to encapsulate the dependencies between one or more :py:class:`~zuul.model.Job` objects. .. autoclass:: zuul.model.Job -.. autoclass:: zuul.model.JobTree +.. autoclass:: zuul.model.JobGraph .. autoclass:: zuul.model.Build The :py:class:`~zuul.manager.base.PipelineManager` enqueues each @@ -48,7 +48,6 @@ a :py:class:`~zuul.model.BuildSet` Changes ~~~~~~~ -.. autoclass:: zuul.model.Changeish .. autoclass:: zuul.model.Change .. autoclass:: zuul.model.Ref diff --git a/doc/source/developer/testing.rst b/doc/source/developer/testing.rst index 092754fe28..4a813d059a 100644 --- a/doc/source/developer/testing.rst +++ b/doc/source/developer/testing.rst @@ -19,7 +19,7 @@ the environment being simulated in the test: .. autoclass:: tests.base.FakeGearmanServer :members: -.. autoclass:: tests.base.RecordingLaunchServer +.. autoclass:: tests.base.RecordingExecutorServer :members: .. autoclass:: tests.base.FakeBuild diff --git a/setup.cfg b/setup.cfg index 86ebf65b0d..9ee64f3321 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,6 +31,7 @@ console_scripts = source-dir = doc/source build-dir = doc/build all_files = 1 +warning-is-error = 1 [extras] mysql_reporter= diff --git a/test-requirements.txt b/test-requirements.txt index b99c803b7b..6262a028f3 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0 coverage>=3.6 -sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 +sphinx>=1.5.1 sphinxcontrib-blockdiag>=1.1.0 fixtures>=0.3.14 python-keystoneclient>=0.4.2 diff --git a/tests/base.py b/tests/base.py index 2816b9f77a..9bd44f651d 100755 --- a/tests/base.py +++ b/tests/base.py @@ -664,8 +664,8 @@ class FakeBuild(object): """Return whether this build has certain changes in its git repos. :arg FakeChange changes: One or more changes (varargs) that - are expected to be present (in order) in the git repository of - the active project. + are expected to be present (in order) in the git repository of + the active project. :returns: Whether the build has the indicated changes. :rtype: bool @@ -1970,7 +1970,7 @@ class ZuulTestCase(BaseTestCase): this method. :arg str connection: The name of the connection corresponding - to the gerrit server. + to the gerrit server. :arg str event: The JSON-encoded event. """