From aa5ad2ec16360a4e99d9133838b863b7639f39fb Mon Sep 17 00:00:00 2001 From: dparalen Date: Tue, 4 Jul 2017 14:46:41 +0200 Subject: [PATCH] switch from oslosphinx to openstackdocstheme Change-Id: I78740d50bcc79137bb7a4172c2695cc670a595ce Partial-Bug: 1702142 --- doc/source/conf.py | 17 +++++++++++++++-- releasenotes/source/conf.py | 17 +++++++++++++++-- test-requirements.txt | 2 +- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 1b0482b4d..b40737fbc 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -7,8 +7,17 @@ # 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/ironic-inspector' +bug_project = 'ironic-inspector' +bug_tag = '' +html_last_updated_fmt = '%Y-%m-%d %H:%M' wsme_protocols = ['restjson'] @@ -64,6 +73,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'] @@ -87,4 +100,4 @@ latex_documents = [ # -- Options for seqdiag ------------------------------------------------------ -seqdiag_html_image_format = "SVG" \ No newline at end of file +seqdiag_html_image_format = "SVG" diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index c52f45180..b5f1b5754 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -38,10 +38,20 @@ # 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 + +repository_name = 'openstack/ironic-inspector' +bug_project = 'ironic-inspector' +bug_tag = '' +html_last_updated_fmt = '%Y-%m-%d %H:%M' + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -112,7 +122,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 03daf92d3..3ea17341e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ flake8-import-order==0.11 # LGPLv3 hacking<0.13,>=0.12.0 # Apache-2.0 mock>=2.0 # BSD sphinx>=1.6.2 # 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 fixtures>=3.0.0 # Apache-2.0/BSD testresources>=0.2.4 # Apache-2.0/BSD