Update api-ref for openstackdocstheme 1.11

Use the new options from openstackdocstheme 1.11, update requirements
for it (syncing with global requirements file).

For details, see https://docs.openstack.org/openstackdocstheme/latest/

Change-Id: I398d0c3fdc07ed184e83c8f25ef7176eac830e30
This commit is contained in:
Andreas Jaeger 2017-06-29 10:54:29 +02:00
parent 1654ea06e7
commit a7bdf0351f
2 changed files with 12 additions and 15 deletions

View File

@ -23,24 +23,25 @@
# serve to show the default. # serve to show the default.
import os import os
import subprocess
import sys import sys
import warnings
from octavia.version import version_info from octavia.version import version_info
import openstackdocstheme
extensions = [ extensions = [
'os_api_ref', 'os_api_ref',
'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_dropdown": "api_ref",
"sidebar_mode": "toc"
} }
html_context = {'bug_project': 'octavia', 'bug_tag': 'api-ref'} repository_name = 'openstack/octavia'
bug_project = 'octavia'
bug_tag = 'api-ref'
# 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
@ -151,13 +152,8 @@ pygments_style = 'sphinx'
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format. # using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y' # html_last_updated_fmt = '%b %d, %Y'
git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", # Must set this variable to include year, month, day, hours, and minutes.
"-n1"] html_last_updated_fmt = '%Y-%m-%d %H:%M'
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

@ -1,15 +1,16 @@
actdiag actdiag
blockdiag blockdiag
docutils==0.11 docutils>=0.11
nwdiag nwdiag
oslosphinx oslosphinx
seqdiag seqdiag
sphinx==1.2.3 sphinx>=1.6.2
sphinxcontrib-actdiag sphinxcontrib-actdiag
sphinxcontrib-blockdiag sphinxcontrib-blockdiag
sphinxcontrib-nwdiag sphinxcontrib-nwdiag
sphinxcontrib-seqdiag sphinxcontrib-seqdiag
graphviz graphviz
openstackdocstheme>=1.11.0 # Apache-2.0
# This needs to be installed after above modules # This needs to be installed after above modules
pydotplus pydotplus