summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-26 09:11:18 +0000
committerGerrit Code Review <review@openstack.org>2017-06-26 09:11:18 +0000
commit106bc00917a3ca975b3aa542ad52268d78b0565a (patch)
treed202f8c0be5f6242169e565a4fcd8c09c0d10866
parent13ac0901d227f7259a0cef5d225ec19f50c2d8ca (diff)
parent06ba42ce5307b9969196e24be90172b82831b105 (diff)
downloadpython-neutronclient-106bc00917a3ca975b3aa542ad52268d78b0565a.tar.gz
Merge "switch to openstackdocstheme"
-rw-r--r--doc/source/conf.py22
-rw-r--r--releasenotes/source/conf.py20
-rw-r--r--test-requirements.txt2
3 files changed, 38 insertions, 6 deletions
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
# "<project> v<release> 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