diff --git a/api-guide/source/conf.py b/api-guide/source/conf.py index 1713e391..9da793ad 100644 --- a/api-guide/source/conf.py +++ b/api-guide/source/conf.py @@ -17,9 +17,6 @@ # serve to show the default. # import sys -import subprocess - -import openstackdocstheme # 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 @@ -34,7 +31,7 @@ import openstackdocstheme # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ['openstackdocstheme'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -50,6 +47,11 @@ master_doc = 'index' # General information about the project. project = u'Key Manager 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' @@ -73,27 +75,6 @@ release = version_info.release_string() # Else, today_fmt is used as the format for a strftime call. # 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 # directories to ignore when looking for source files. exclude_patterns = [] @@ -135,7 +116,7 @@ html_theme = 'openstackdocs' # html_theme_options = {} # 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 # " v documentation". diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index 8bd839f0..4aaad153 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -23,20 +23,16 @@ # serve to show the default. import os -import subprocess import sys -import warnings - -import openstackdocstheme html_theme = 'openstackdocs' -html_theme_path = [openstackdocstheme.get_html_theme_path()] html_theme_options = { "sidebar_mode": "toc", } extensions = [ 'os_api_ref', + 'openstackdocstheme' ] # If extensions (or modules to document with autodoc) are in another directory, @@ -72,6 +68,10 @@ master_doc = 'index' # General information about the project. project = u'Key Manager API Reference' 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 # |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. version = version_info.version_string() -html_context = {'bug_project': 'barbican', 'bug_tag': 'api-ref'} - # The language for content autogenerated by Sphinx. Refer to documentation # 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 # bottom, using the given strftime format. # The empty string is equivalent to '%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. diff --git a/doc/source/conf.py b/doc/source/conf.py index 2326a770..12909a7e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -22,7 +22,7 @@ sys.path.insert(0, os.path.abspath('../..')) extensions = [ 'sphinx.ext.autodoc', # 'sphinx.ext.intersphinx', - 'oslosphinx' + 'openstackdocstheme' ] # autodoc generation is a bit aggressive and a nuisance when doing heavy @@ -38,6 +38,12 @@ master_doc = 'index' # General information about the project. project = u'Barbican' 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. add_function_parentheses = True @@ -55,6 +61,7 @@ pygments_style = 'sphinx' # Sphinx are currently 'default' and 'sphinxdoc'. # html_theme_path = ["."] # html_theme = '_theme' +html_theme = 'openstackdocs' # html_static_path = ['static'] html_theme_options = {} diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index bffee7fb..4a23ae51 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', ] @@ -56,6 +56,12 @@ master_doc = 'index' # General information about the project. project = u'Barbican Release Notes' 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 # |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 # 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 diff --git a/test-requirements.txt b/test-requirements.txt index c7c6f1d9..eb5ac2fb 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -23,8 +23,7 @@ python-subunit>=0.0.18 # Apache-2.0/BSD bandit>=1.1.0 # Apache-2.0 # Documentation build requirements -sphinx!=1.6.1,>=1.5.1 # BSD -oslosphinx>=4.7.0 # Apache-2.0 +sphinx>=1.6.2 # BSD os-api-ref>=1.0.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