From 4c9da40a7b2bd33092c0e72de47893148e80e2e4 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 6 Oct 2015 13:56:12 +0200 Subject: [PATCH] Update log-a-bug comments Enhance comments for conf.py. Remove now obsolete variable pwd. Co-Authored-By: Bernd Bausch Change-Id: If339d286437547a2d319cc0a270d97ef39d69784 --- doc/source/conf.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index b0cd7f48..499ceb86 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -49,9 +49,6 @@ master_doc = 'index' # and should ultimately be set automatically by the build process project = u'network guide' copyright = u'2015, OpenStack Contributors' -# "giturl" contains the location of conf.py in Git. log-a-bug requires it to -# automatically build a complete bug description. -giturl = u'http://git.openstack.org/cgit/openstack/openstackdocstheme/tree/doc/source' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -64,17 +61,16 @@ version = '1.0' # The full version, including alpha/beta/rc tags. release = '1.0' -# We ask git for the SHA checksum -# The git SHA checksum is used by "log-a-bug" +# 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. Automatically extracted from git log. +# bug_tag: Tag for categorizing the bug. Must be set manually. +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/openstackdocstheme/tree/doc/source' git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" gitsha = os.popen(git_cmd).read().strip('\n') -# tag that reported bugs will be tagged with when using the "log a bug" -# clickthrough on each page, such as user-guide or install-guide bug_tag = "doc-builds" -# source tree -pwd = os.getcwd() -# html_context allows us to pass arbitrary values into the html template -html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, "giturl" : giturl } +html_context = {"gitsha": gitsha, "bug_tag": bug_tag, "giturl" : giturl} # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.