Fix docs building
With Sphinx 2.0.1 working only with python3, update the configuration: * Use openstackdocstheme (oslosphinx does not work with python3) * Update requirements * Update tox.ini to use normal lines for doc building Also, fix URL for repo after OpenDev rename. Fix flake8 tests, don't test openstack-ansible-tests files. Change-Id: I464d04738aab137ea8e938614b804e1ac50f6741
This commit is contained in:
parent
d3381fc7a0
commit
b92073453c
|
@ -45,11 +45,15 @@ import pbr.version
|
||||||
# ones.
|
# ones.
|
||||||
extensions = [
|
extensions = [
|
||||||
'sphinx.ext.autodoc',
|
'sphinx.ext.autodoc',
|
||||||
'oslosphinx',
|
'openstackdocstheme',
|
||||||
# Disabled, does not build
|
# Disabled, does not build
|
||||||
# 'sphinxmark'
|
# 'sphinxmark'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
repository_name = 'x/monitorstack'
|
||||||
|
bug_project = 'monitorstack'
|
||||||
|
bug_tag = ''
|
||||||
|
|
||||||
# Add any paths that contain templates here, relative to this directory.
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
@ -67,10 +71,6 @@ project = u'monitorstack'
|
||||||
copyright = u'2017, OpenStack-Ansible Contributors'
|
copyright = u'2017, OpenStack-Ansible Contributors'
|
||||||
author = u'OpenStack-Ansible Contributors'
|
author = u'OpenStack-Ansible Contributors'
|
||||||
|
|
||||||
# The link to the browsable source code (for the left hand menu)
|
|
||||||
oslosphinx_cgit_link = ('http://git.openstack.org/cgit/openstack'
|
|
||||||
'/{0}'.format(project))
|
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
|
@ -82,17 +82,6 @@ release = version_info.version_string_with_vcs()
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = version_info.canonical_version_string()
|
version = version_info.canonical_version_string()
|
||||||
|
|
||||||
# A few variables have to be set for the log-a-bug feature.
|
|
||||||
# gitsha: The SHA checksum of the bug description.
|
|
||||||
# Automatically extracted from git log.
|
|
||||||
# bug_tag: Tag for categorizing the bug. Must be set manually.
|
|
||||||
# These variables are passed to the logabug code via html_context.
|
|
||||||
git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
|
|
||||||
gitsha = os.popen(git_cmd).read().strip('\n')
|
|
||||||
bug_project = project.lower()
|
|
||||||
bug_title = "Documentation bug"
|
|
||||||
html_context = {"gitsha": gitsha, "bug_tag": "docs",
|
|
||||||
"bug_title": bug_title, "bug_project": bug_project}
|
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
@ -118,7 +107,8 @@ todo_include_todos = False
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
#
|
#
|
||||||
html_theme = 'default'
|
html_theme = 'openstackdocs'
|
||||||
|
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# Theme options are theme-specific and customize the look and feel of a theme
|
||||||
# further. For a list of options available for each theme, see the
|
# further. For a list of options available for each theme, see the
|
||||||
|
|
|
@ -63,10 +63,6 @@ project = u'monitorstack'
|
||||||
copyright = u'2017, OpenStack-Ansible Contributors'
|
copyright = u'2017, OpenStack-Ansible Contributors'
|
||||||
author = u'OpenStack-Ansible Contributors'
|
author = u'OpenStack-Ansible Contributors'
|
||||||
|
|
||||||
# The link to the browsable source code (for the left hand menu)
|
|
||||||
oslosphinx_cgit_link = ('http://git.openstack.org/cgit/openstack'
|
|
||||||
'/{0}'.format(project))
|
|
||||||
|
|
||||||
# Release notes do not need a version number in the title, they
|
# Release notes do not need a version number in the title, they
|
||||||
# cover multiple releases.
|
# cover multiple releases.
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
|
@ -74,11 +70,10 @@ release = ''
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = ''
|
version = ''
|
||||||
|
|
||||||
repository_name = 'openstack/monitorstack'
|
repository_name = 'x/monitorstack'
|
||||||
bug_project = 'monitorstack'
|
bug_project = 'monitorstack'
|
||||||
bug_tag = ''
|
bug_tag = ''
|
||||||
|
|
||||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
@ -8,9 +8,9 @@ flake8-import-order==0.11 # LGPLv3
|
||||||
mock>=2.0 # BSD
|
mock>=2.0 # BSD
|
||||||
|
|
||||||
# this is required for the docs build jobs
|
# this is required for the docs build jobs
|
||||||
sphinx>=1.6.2 # BSD
|
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
|
||||||
|
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD
|
||||||
openstackdocstheme>=1.17.0 # Apache-2.0
|
openstackdocstheme>=1.17.0 # Apache-2.0
|
||||||
oslosphinx>=4.7.0 # Apache-2.0
|
|
||||||
doc8 # Apache-2.0
|
doc8 # Apache-2.0
|
||||||
reno>=1.8.0 # Apache-2.0
|
reno>=1.8.0 # Apache-2.0
|
||||||
sphinxmark>=0.1.14 # Apache-2.0
|
sphinxmark>=0.1.14 # Apache-2.0
|
||||||
|
|
11
tox.ini
11
tox.ini
|
@ -25,7 +25,6 @@ commands =
|
||||||
coverage run -m pytest --capture=no --strict {posargs}
|
coverage run -m pytest --capture=no --strict {posargs}
|
||||||
coverage report -m --omit="*/test*" --fail-under=90
|
coverage report -m --omit="*/test*" --fail-under=90
|
||||||
|
|
||||||
# environment used by the -infra templated docs job
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands =
|
commands =
|
||||||
{posargs}
|
{posargs}
|
||||||
|
@ -34,7 +33,7 @@ commands =
|
||||||
commands=
|
commands=
|
||||||
bash -c "rm -rf doc/build"
|
bash -c "rm -rf doc/build"
|
||||||
doc8 doc
|
doc8 doc
|
||||||
python setup.py build_sphinx
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
||||||
|
|
||||||
[doc8]
|
[doc8]
|
||||||
# Settings for doc8:
|
# Settings for doc8:
|
||||||
|
@ -64,7 +63,7 @@ deps =
|
||||||
flake8-import-order
|
flake8-import-order
|
||||||
pep8-naming
|
pep8-naming
|
||||||
commands =
|
commands =
|
||||||
flake8 .
|
flake8
|
||||||
|
|
||||||
[testenv:py3pep8]
|
[testenv:py3pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
@ -73,7 +72,9 @@ deps =
|
||||||
flake8-import-order
|
flake8-import-order
|
||||||
pep8-naming
|
pep8-naming
|
||||||
commands =
|
commands =
|
||||||
flake8 .
|
flake8
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
exclude = .tox,*.egg,.git,_build,docs-rst
|
# tests/common/ansible-lint/test comes from openstack-ansible-tests,
|
||||||
|
# blacklist it
|
||||||
|
exclude = .tox,*.egg,.git,_build,docs-rst,tests/common/ansible-lint/test
|
||||||
|
|
Loading…
Reference in New Issue