From b0b0181ab88193ccf5caf79c303cc90600475342 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Wed, 18 Sep 2019 19:22:24 +0200 Subject: [PATCH] Update docstheme options Update openstackdocstheme options so that "Report a bug" works. Remove git settings for last update, the theme handles this now by default. Remove viewdocs and autodocs options, they are for source code but this repo has no sourcecode. Update minimal openstackdocstheme version so that these settings work. Change-Id: I1dedf35825fd2fbd4dcbf8991affcd1f54d0ed70 --- doc/source/conf.py | 20 +++++++------------- requirements.txt | 2 +- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 1cd384d3..c674bc4a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -10,8 +10,6 @@ # serve to show the default. import datetime -import subprocess -import warnings # 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 @@ -26,12 +24,17 @@ import warnings # 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', - 'sphinx.ext.viewcode', +extensions = [ 'sphinxcontrib.blockdiag', 'openstackdocstheme', ] + +# openstackdocstheme options +repository_name = "openstack/keystone-specs" +bug_project = "keystone" +bug_tag = "specs" + blockdiag_html_image_format = 'SVG' blockdiag_fontpath = 'DejaVuSans.ttf' @@ -120,15 +123,6 @@ html_theme = 'openstackdocs' # pixels large. #html_favicon = None -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -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".') # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True diff --git a/requirements.txt b/requirements.txt index b4cfe231..aa70be2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ pbr>=2.0.0 sphinx>=1.5.1,!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7' # BSD sphinx>=1.5.1,!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4' # BSD sphinxcontrib-blockdiag -openstackdocstheme>=1.17.0 # Apache-2.0 +openstackdocstheme>=1.20.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testtools>=0.9.34 doc8