docs: Modernize build process

Update the state of the art build process (TM), featuring an all new
theme, new requirements and much more.

Change-Id: I5d8724786361a820016cc02d8985f2438a1f9d57
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
Stephen Finucane 2018-06-29 16:03:17 +01:00
parent 5b4d0f8226
commit b0256a71b2
5 changed files with 23 additions and 28 deletions

2
doc/requirements.txt Normal file
View File

@ -0,0 +1,2 @@
sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
openstackdocstheme>=1.19.0 # Apache-2.0

View File

@ -12,8 +12,6 @@
import os
import sys
import nova_powervm.version
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -26,7 +24,7 @@ sys.path.insert(0, os.path.abspath('../'))
# ones.
extensions = [
'sphinx.ext.autodoc',
'oslosphinx',
'openstackdocstheme',
'ext.support_matrix'
]
@ -40,21 +38,16 @@ master_doc = 'index'
project = u'nova-powervm'
copyright = u'2015, IBM'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = nova_powervm.version.version_info.version_string()
# The full version, including alpha/beta/rc tags.
release = nova_powervm.version.version_info.release_string()
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'openstackdocs'
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
@ -82,3 +75,10 @@ man_pages = [
u'%s Documentation' % project,
u'IBM', 1)
]
# -- Options for openstackdocstheme ---------------------------------------
repository_name = 'openstack/nova-powervm'
bug_project = 'nova-powervm'
bug_tag = ''

View File

@ -22,14 +22,6 @@ packages =
nova_powervm
nova/virt/powervm_ext
[build_sphinx]
source-dir = doc/source
build-dir = doc/build
all_files = 1
[upload_sphinx]
upload-dir = doc/build/html
[compile_catalog]
directory = nova_powervm/locale
domain = nova-powervm

View File

@ -7,8 +7,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
python-subunit>=1.0.0 # Apache-2.0/BSD
python-swiftclient>=3.2.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
oslosphinx>=4.7.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD

15
tox.ini
View File

@ -9,11 +9,11 @@ install_command = pip install {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-egit+https://git.openstack.org/openstack/nova#egg=nova
-rhttps://git.openstack.org/cgit/openstack/nova/plain/test-requirements.txt
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-egit+https://git.openstack.org/openstack/nova#egg=nova
-rhttps://git.openstack.org/cgit/openstack/nova/plain/test-requirements.txt
whitelist_externals = bash
commands = bash tools/pretty_tox.sh '{posargs}'
@ -31,7 +31,10 @@ commands = python setup.py testr --coverage --testr-args='{posargs}'
[testenv:docs]
basepython = python3
commands = python setup.py build_sphinx
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:bashate]
basepython = python3