From 54332bc38c6b3f4bbb941d57fda9d990b51ab078 Mon Sep 17 00:00:00 2001 From: dparalen Date: Mon, 10 Jul 2017 18:58:58 +0200 Subject: [PATCH] Switch from oslosphinx to openstackdocstheme Change-Id: I0203e1abd862ca713965092a45b8bcef29651a02 --- doc/source/conf.py | 16 +++++++++++++++- releasenotes/source/conf.py | 13 +++++++++++-- test-requirements.txt | 2 +- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index f2b5779..9095c69 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -7,9 +7,19 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', - 'oslosphinx', ] +try: + import openstackdocstheme + extensions.append('openstackdocstheme') +except ImportError: + openstackdocstheme = None + +repository_name = 'openstack/python-ironic-inspector-client' +bug_project = 'python-ironic-inspector-client' +bug_tag = '' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + wsme_protocols = ['restjson'] # autodoc generation is a bit aggressive and a nuisance when doing heavy @@ -57,6 +67,10 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. +if openstackdocstheme is not None: + html_theme = 'openstackdocs' +else: + html_theme = 'default' #html_theme_path = ["."] #html_theme = '_theme' #html_static_path = ['_static'] diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 68f6f34..abaecf5 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -38,10 +38,16 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', 'reno.sphinxext', ] +try: + import openstackdocstheme + extensions.append('openstackdocstheme') +except ImportError: + openstackdocstheme = None + + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -112,7 +118,10 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +if openstackdocstheme is not None: + html_theme = 'openstackdocs' +else: + html_theme = 'default' # 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 diff --git a/test-requirements.txt b/test-requirements.txt index ae1c3c1..d2bc083 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,6 +8,6 @@ hacking<0.13,>=0.12.0 # Apache-2.0 mock>=2.0 # BSD requests-mock>=1.1 # Apache-2.0 sphinx!=1.6.1,>=1.5.1 # BSD -oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.11.0 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0 oslo.concurrency>=3.8.0 # Apache-2.0