From 708d09be77f58880eac74443648148d4b81be011 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Fri, 12 Jan 2018 16:24:59 -0500 Subject: [PATCH] update documentation build for new PTI Move documentation dependencies to doc/requirements.txt Change tox.ini to run sphinx-build directly, like the zuul job does. Switch from oslosphinx to openstackdocstheme. Change-Id: I079ff78edacaba673461824af770344cb3a896f2 Signed-off-by: Doug Hellmann --- doc/requirements.txt | 6 ++++++ doc/source/conf.py | 7 ++++++- test-requirements.txt | 6 ------ tox.ini | 6 +++++- 4 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 00000000..7cefa46d --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,6 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +sphinx>=1.1.2 +sphinxcontrib-pecanwsme>=0.5 +openstackdocstheme diff --git a/doc/source/conf.py b/doc/source/conf.py index a2ca3008..a754076e 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,7 +27,7 @@ extensions = [ 'sphinxcontrib.httpdomain', 'sphinxcontrib.pecanwsme.rest', 'wsmeext.sphinxext', - 'oslo.sphinx' + 'openstackdocstheme' ] wsme_protocols = ['restjson', 'restxml'] @@ -63,6 +63,11 @@ pygments_style = 'sphinx' # html_theme_path = ["."] # html_theme = '_theme' # html_static_path = ['static'] +html_theme = 'openstackdocs' + +repository_name = 'openstack-infra/storyboard' +bug_project = '456' +html_last_updated_fmt = '%Y-%m-%d %H:%M' # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/test-requirements.txt b/test-requirements.txt index bf8a3fe3..f4c1f025 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,15 +4,9 @@ coverage>=3.6 fixtures>=0.3.14 mock>=1.0 python-subunit -oslo.sphinx oslotest>=1.2.0 os-testr>=1.0.0 testrepository>=0.0.18 testscenarios>=0.4,<0.5 testtools>=0.9.34 posix_ipc>=0.9.8 - - -# Doc requirements -sphinx>=1.1.2,<1.2 -sphinxcontrib-pecanwsme>=0.5 diff --git a/tox.ini b/tox.ini index 1e4356ec..1136957a 100644 --- a/tox.ini +++ b/tox.ini @@ -25,10 +25,14 @@ basepython = python2 commands = {posargs} [testenv:docs] +deps = -r{toxinidir}/doc/requirements.txt commands = rm -rf doc/html doc/build rm -rf doc/source/apidoc doc/source/api - python setup.py build_sphinx + # NOTE(dhellmann): We cannot use -W with sphinx-build because the + # wsme.sphinxext registers a directive that is already registered + # and that warning causes the build to exit. + sphinx-build -b html doc/source doc/build/html [testenv:cover] commands = python setup.py testr --coverage --testr-args='{posargs}'