From 6e631db558b10923192a279efb1eeb5c218ae322 Mon Sep 17 00:00:00 2001 From: Van Hung Pham Date: Fri, 30 Jun 2017 14:07:10 +0700 Subject: [PATCH] Switch from oslosphinx to openstackdocstheme As part of the docs migration work[0] for Pike we need to switch to use the openstackdocstheme. [0]https://review.openstack.org/#/c/472275/ Change-Id: I31543b78a1b2d2df685e295d4d011c5e6e4a165b --- doc/source/conf.py | 21 +++++++-------------- releasenotes/source/conf.py | 10 ++++++++-- test-requirements.txt | 1 - 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 63c36524db..23d014c69d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -25,11 +25,7 @@ # serve to show the default. import os -import subprocess import sys -import warnings - -import openstackdocstheme # NOTE(dstanek): adds _ to the builtins so keystone modules can be imported __builtins__['_'] = str @@ -54,7 +50,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'oslo_config.sphinxconfiggen', 'oslo_policy.sphinxpolicygen', - 'oslosphinx', + 'openstackdocstheme', 'ext.support_matrix', ] @@ -137,7 +133,6 @@ man_pages = [ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme_path = [openstackdocstheme.get_html_theme_path()] html_theme = 'openstackdocs' # Theme options are theme-specific and customize the look and feel of a theme @@ -172,14 +167,7 @@ html_static_path = ['_static'] # 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".') +html_last_updated_fmt = '%Y-%m-%d %H:%M' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. @@ -287,3 +275,8 @@ texinfo_documents = [ # Example configuration for intersphinx: refer to the Python standard library. # intersphinx_mapping = {'http://docs.python.org/': None} + +# -- Options for openstackdocstheme ------------------------------------------- +repository_name = 'openstack/keystone' +bug_project = 'keystone' +bug_tag = 'doc' diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 4240848e79..62657a541c 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -37,7 +37,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'oslosphinx', + 'openstackdocstheme', 'reno.sphinxext', ] @@ -112,7 +112,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 @@ -151,6 +151,7 @@ html_static_path = ['_static'] # 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' +html_last_updated_fmt = '%Y-%m-%d %H:%M' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. @@ -275,3 +276,8 @@ texinfo_documents = [ # -- Options for Internationalization output ------------------------------ locale_dirs = ['locale/'] + +# -- Options for openstackdocstheme ------------------------------------------- +repository_name = 'openstack/keystone' +bug_project = 'keystone' +bug_tag = 'doc' diff --git a/test-requirements.txt b/test-requirements.txt index 5d12c00393..6bc6a9ebe7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -33,7 +33,6 @@ testtools>=1.4.0 # MIT # For documentation openstackdocstheme>=1.11.0 # Apache-2.0 -oslosphinx>=4.7.0 # Apache-2.0 reno!=2.3.1,>=1.8.0 # Apache-2.0 tempest>=14.0.0 # Apache-2.0