Use openstackdocstheme 1.11 everywhere

Switch to use openstackdocstheme 1.11 for all documents and set it up
following correctly.

Change-Id: If312a985702b1b591d3ca7346c5349905b23a66a
This commit is contained in:
Andreas Jaeger 2017-06-29 09:28:49 +02:00
parent b86d6b5660
commit 1d1a6f3729
5 changed files with 31 additions and 46 deletions

View File

@ -17,9 +17,6 @@
# serve to show the default. # serve to show the default.
# import sys # import sys
import subprocess
import openstackdocstheme
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
@ -34,7 +31,7 @@ import openstackdocstheme
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [] extensions = ['openstackdocstheme']
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']
@ -50,6 +47,11 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Key Manager API Guide' project = u'Key Manager API Guide'
bug_tag = u'api-guide' bug_tag = u'api-guide'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
copyright = u'2016, OpenStack contributors' copyright = u'2016, OpenStack contributors'
@ -73,27 +75,6 @@ release = version_info.release_string()
# Else, today_fmt is used as the format for a strftime call. # Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y' # today_fmt = '%B %d, %Y'
# A few variables have to be set for the log-a-bug feature.
# giturl: The location of conf.py on Git. Must be set manually.
# gitsha: The SHA checksum of the bug description. Extracted from git log.
# bug_tag: Tag for categorizing the bug. Must be set manually.
# bug_project: Launchpad project to file bugs against.
# These variables are passed to the logabug code via html_context.
giturl = (u"https://git.openstack.org/cgit/openstack/barbican/tree/"
"api-guide/source")
git_cmd = ["/usr/bin/git", "rev-parse", "HEAD"]
gitsha = subprocess.check_output(git_cmd).decode('utf-8')
# source tree
pwd = subprocess.check_output("pwd").decode('utf-8')
# html_context allows us to pass arbitrary values into the html template
html_context = {"pwd": pwd,
"gitsha": gitsha,
"bug_tag": bug_tag,
"giturl": giturl,
"bug_project": "barbican"}
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = [] exclude_patterns = []
@ -135,7 +116,7 @@ html_theme = 'openstackdocs'
# html_theme_options = {} # html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory. # Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [openstackdocstheme.get_html_theme_path()] # html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".

View File

@ -23,20 +23,16 @@
# serve to show the default. # serve to show the default.
import os import os
import subprocess
import sys import sys
import warnings
import openstackdocstheme
html_theme = 'openstackdocs' html_theme = 'openstackdocs'
html_theme_path = [openstackdocstheme.get_html_theme_path()]
html_theme_options = { html_theme_options = {
"sidebar_mode": "toc", "sidebar_mode": "toc",
} }
extensions = [ extensions = [
'os_api_ref', 'os_api_ref',
'openstackdocstheme'
] ]
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
@ -72,6 +68,10 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Key Manager API Reference' project = u'Key Manager API Reference'
copyright = u'OpenStack Foundation' copyright = u'OpenStack Foundation'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
bug_tag = 'api-ref'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -83,8 +83,6 @@ release = version_info.release_string()
# The short X.Y version. # The short X.Y version.
version = version_info.version_string() version = version_info.version_string()
html_context = {'bug_project': 'barbican', 'bug_tag': 'api-ref'}
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
# #
@ -174,13 +172,7 @@ todo_include_todos = False
# If not None, a 'Last updated on:' timestamp is inserted at every page # If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format. # bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'. # The empty string is equivalent to '%b %d, %Y'.
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", html_last_updated_fmt = '%Y-%m-%d %H:%M'
"-n1"]
try:
html_last_updated_fmt = subprocess.check_output(git_cmd).decode('utf-8')
except Exception:
warnings.warn('Cannot get last updated time from git repository. '
'Not setting "html_last_updated_fmt".')
# If true, SmartyPants will be used to convert quotes and dashes to # If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. # typographically correct entities.

View File

@ -22,7 +22,7 @@ sys.path.insert(0, os.path.abspath('../..'))
extensions = [ extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.autodoc',
# 'sphinx.ext.intersphinx', # 'sphinx.ext.intersphinx',
'oslosphinx' 'openstackdocstheme'
] ]
# autodoc generation is a bit aggressive and a nuisance when doing heavy # autodoc generation is a bit aggressive and a nuisance when doing heavy
@ -38,6 +38,12 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Barbican' project = u'Barbican'
copyright = u'2014, OpenStack Foundation' copyright = u'2014, OpenStack Foundation'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
bug_tag = ''
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# If true, '()' will be appended to :func: etc. cross-reference text. # If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True add_function_parentheses = True
@ -55,6 +61,7 @@ pygments_style = 'sphinx'
# Sphinx are currently 'default' and 'sphinxdoc'. # Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."] # html_theme_path = ["."]
# html_theme = '_theme' # html_theme = '_theme'
html_theme = 'openstackdocs'
# html_static_path = ['static'] # html_static_path = ['static']
html_theme_options = {} html_theme_options = {}

View File

@ -37,7 +37,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones. # ones.
extensions = [ extensions = [
'oslosphinx', 'openstackdocstheme',
'reno.sphinxext', 'reno.sphinxext',
] ]
@ -56,6 +56,12 @@ master_doc = 'index'
# General information about the project. # General information about the project.
project = u'Barbican Release Notes' project = u'Barbican Release Notes'
copyright = u'2015, Barbican Developers' copyright = u'2015, Barbican Developers'
repository_name = 'openstack/barbican'
bug_project = 'barbican'
bug_tag = ''
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
@ -110,7 +116,7 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for # The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes. # 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 # 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 # further. For a list of options available for each theme, see the

View File

@ -23,8 +23,7 @@ python-subunit>=0.0.18 # Apache-2.0/BSD
bandit>=1.1.0 # Apache-2.0 bandit>=1.1.0 # Apache-2.0
# Documentation build requirements # Documentation build requirements
sphinx!=1.6.1,>=1.5.1 # BSD sphinx>=1.6.2 # BSD
oslosphinx>=4.7.0 # Apache-2.0
os-api-ref>=1.0.0 # Apache-2.0 os-api-ref>=1.0.0 # Apache-2.0
reno!=2.3.1,>=1.8.0 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0
openstackdocstheme>=1.5.0 # Apache-2.0 openstackdocstheme>=1.11.0 # Apache-2.0