Remove pbr warnerrors in favor of sphinx check

This change removes the soon-to-be unused "warnerrors" setting,
which will be replaced by "warning-is-error" in sphinx
releases >= 1.5.[0] This also pre-emptively fixes most warnings
that came up when testing with sphinx >= 1.5:

- Multiple cases of Opts
- Redundant loading of todo extension

Added a comment to not to enable the new sphinx setting until
the issues with Changlog building are fixed.

Added setup.py to the list of files to ignore when building
docs.

[0] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113085.html

Change-Id: Ia0079c6b551dd3896bc3d922a477f927757bd61b
This commit is contained in:
Gage Hugo 2017-03-01 12:04:14 -06:00
parent 3364703d3b
commit 7bf7619104
6 changed files with 17 additions and 6 deletions

View File

@ -38,7 +38,6 @@ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
# extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.intersphinx',
'oslosphinx',

View File

@ -27,7 +27,7 @@ Authentication plugins still implement the base authentication class
:py:class:`~keystoneauth1.plugin.BaseAuthPlugin`. To make the plugins capable
of being loaded from CLI or CONF file you should implement the base
:py:class:`~keystoneauth1.loading.BaseLoader` class which is loaded when
:option:`--os-auth-type` is used. This class handles the options that are
`--os-auth-type` is used. This class handles the options that are
presented, and then constructs the authentication plugin for use by the
application.

View File

@ -12,7 +12,7 @@
from keystoneauth1.extras.oauth1 import v3
__all__ = ('V3OAuth1Method', 'V3OAuth')
__all__ = ('V3OAuth1Method', 'V3OAuth1')
V3OAuth1Method = v3.OAuth1Method

View File

@ -50,8 +50,9 @@ class Opt(object):
:param str dest: the name of the argument that will be passed to __init__.
This allows you to have a different name in loading than is used by the
__init__ function. Defaults to the value of name.
:param opt: A list of other options that are deprecated in favour of this
one. This ensures the old options are still registered.
:param keystoneauth1.loading.Opt: A list of other options that are
deprecated in favour of this one. This ensures the old options are
still registered.
:type opt: list(Opt)
:param default: A default value that can be used if one is not provided.
:param str metavar: The <metavar> that should be printed in CLI help text.

View File

@ -59,10 +59,17 @@ keystoneauth1.plugin =
source-dir = doc/source
build-dir = doc/build
all_files = 1
# NOTE(gagehugo): Sphinx currently reads the Changelog in order
# to create the appropriate page, and this causes warnings to be thrown
# which causes the below setting to treat them as errors and fail.
# Once change 439897 merges (or something else is
# done to fix this issue) the below setting can be uncommented
# to allow sphinx warnings to be considered errors.
#warning-is-error = 1
[pbr]
warnerrors = True
autodoc_tree_index_modules = True
autodoc_tree_excludes = setup.py
[upload_sphinx]
upload-dir = doc/build/html

View File

@ -16,6 +16,8 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
.[kerberos,saml2,betamax,oauth1]
commands = ostestr {posargs}
whitelist_externals =
bash
[testenv:pep8]
commands =
@ -52,6 +54,8 @@ exclude = .venv,.tox,dist,doc,*egg,build
[testenv:docs]
commands=
bash -c "rm -rf doc/build"
bash -c "rm -rf doc/source/api"
python setup.py build_sphinx
[testenv:releasenotes]