diff --git a/doc/source/conf.py b/doc/source/conf.py index bc6dad7..0e4f725 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,6 +1,11 @@ # -*- coding: utf-8 -*- # +import os + +import openstackdocstheme + + project = 'python-neutronclient' # -- General configuration --------------------------------------------- @@ -8,7 +13,6 @@ project = 'python-neutronclient' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['sphinx.ext.autodoc', - 'oslosphinx', 'reno.sphinxext', ] @@ -38,7 +42,21 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -# html_theme = 'nature' +html_theme = 'openstackdocs' + +html_theme_path = [openstackdocstheme.get_html_theme_path()] + +gitsha = os.popen("/usr/bin/git rev-parse HEAD").read() +giturl = ('https://git.openstack.org/cgit/openstack/%s/tree/doc/source' + % 'python-neutronclient') +html_context = { + 'gitsha': gitsha, + 'giturl': giturl, + 'bug_project': 'python-neutronclient', + 'bug_tag': 'doc', +} +html_last_updated_fmt = os.popen("git log --pretty=format:'%ad' " + "--date=format:'%Y-%m-%d %H:%M' -n1").read() # Output file base name for HTML help builder. htmlhelp_basename = '%sdoc' % project diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 4e72a7b..f635d2e 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -29,6 +29,10 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) +import os + +import openstackdocstheme + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -38,7 +42,6 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', 'reno.sphinxext', ] @@ -112,7 +115,7 @@ 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' +html_theme = 'openstackdocs' # 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 @@ -120,7 +123,7 @@ html_theme = 'default' # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] +html_theme_path = [openstackdocstheme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". @@ -192,6 +195,17 @@ html_static_path = ['_static'] # Output file base name for HTML help builder. htmlhelp_basename = 'NeutronReleaseNotesdoc' +gitsha = os.popen("/usr/bin/git rev-parse HEAD").read() +giturl = ('https://git.openstack.org/cgit/openstack/%s/tree/doc/source' + % 'python-neutronclient') +html_context = { + 'gitsha': gitsha, + 'giturl': giturl, + 'bug_project': 'python-neutronclient', + 'bug_tag': 'doc', +} +html_last_updated_fmt = os.popen("git log --pretty=format:'%ad' " + "--date=format:'%Y-%m-%d %H:%M' -n1").read() # -- Options for LaTeX output --------------------------------------------- diff --git a/test-requirements.txt b/test-requirements.txt index 67e6c2d..6805786 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ coverage!=4.4,>=4.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD mox3!=0.19.0,>=0.7.0 # Apache-2.0 mock>=2.0 # BSD -oslosphinx>=4.7.0 # Apache-2.0 +openstackdocstheme>=1.5.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 osprofiler>=1.4.0 # Apache-2.0 python-openstackclient!=3.10.0,>=3.3.0 # Apache-2.0