From a7bdf0351f52b37f1eab250444e65ed8190a2495 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 29 Jun 2017 10:54:29 +0200 Subject: [PATCH] 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 --- api-ref/source/conf.py | 22 +++++++++------------- doc-requirements.txt | 5 +++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index bd71af5c7b..faaefbd458 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -23,24 +23,25 @@ # serve to show the default. import os -import subprocess import sys -import warnings from octavia.version import version_info -import openstackdocstheme extensions = [ 'os_api_ref', + 'openstackdocstheme' ] html_theme = 'openstackdocs' -html_theme_path = [openstackdocstheme.get_html_theme_path()] 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, # 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, # using the given strftime format. # html_last_updated_fmt = '%b %d, %Y' -git_cmd = ["git", "log", "--pretty=format:'%ad, commit %h'", "--date=local", - "-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".') +# Must set this variable to include year, month, day, hours, and minutes. +html_last_updated_fmt = '%Y-%m-%d %H:%M' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. diff --git a/doc-requirements.txt b/doc-requirements.txt index d4ace281a6..9a362eeba4 100644 --- a/doc-requirements.txt +++ b/doc-requirements.txt @@ -1,15 +1,16 @@ actdiag blockdiag -docutils==0.11 +docutils>=0.11 nwdiag oslosphinx seqdiag -sphinx==1.2.3 +sphinx>=1.6.2 sphinxcontrib-actdiag sphinxcontrib-blockdiag sphinxcontrib-nwdiag sphinxcontrib-seqdiag graphviz +openstackdocstheme>=1.11.0 # Apache-2.0 # This needs to be installed after above modules pydotplus