From 8750c28ab14a8ff8f94c9fdab32980fd3707c159 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 6 Oct 2015 08:22:05 +0200 Subject: [PATCH] Set giturl for openstackdocstheme 1.2.3 Also whitelist conf.py by flake8. Co-Authored-By: Bernd Bausch Change-Id: I9899fde4586a44aa4dd4e48402a3f25933bebc4a --- doc/admin-guide-cloud/source/conf.py | 14 +++++++++----- doc/contributor-guide/source/conf.py | 15 ++++++++++----- doc/install-guide/source/conf.py | 14 +++++++++----- doc/networking-guide/source/conf.py | 14 +++++++++----- doc/user-guide-admin/source/conf.py | 14 +++++++++----- doc/user-guide/source/conf.py | 14 +++++++++----- tox.ini | 2 +- 7 files changed, 56 insertions(+), 31 deletions(-) diff --git a/doc/admin-guide-cloud/source/conf.py b/doc/admin-guide-cloud/source/conf.py index 7f46af08d7..c33ed53add 100644 --- a/doc/admin-guide-cloud/source/conf.py +++ b/doc/admin-guide-cloud/source/conf.py @@ -68,14 +68,18 @@ version = '0.9' # The full version, including alpha/beta/rc tags. release = '0.9' -# 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. +# pwd: source tree - this is needed only for openstackdocstheme <= 1.2.2 +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/admin-guide-cloud/source' git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" gitsha = os.popen(git_cmd).read().strip('\n') -# source tree pwd = os.popen("pwd").read().strip('\n') -# html_context allows us to pass arbitrary values into the html template -html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag} +html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl} # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/contributor-guide/source/conf.py b/doc/contributor-guide/source/conf.py index 2c2b4d836a..2d8e74339d 100644 --- a/doc/contributor-guide/source/conf.py +++ b/doc/contributor-guide/source/conf.py @@ -61,6 +61,7 @@ bug_tag = u'contributor-guide' copyright = u'2015, OpenStack contributors' + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. @@ -70,14 +71,18 @@ version = '1.0.0' # The full version, including alpha/beta/rc tags. release = '1.0.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. +# pwd: source tree - this is needed only for openstackdocstheme <= 1.2.2 +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/contributor-guide/source' git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" gitsha = os.popen(git_cmd).read().strip('\n') -# source tree pwd = os.popen("pwd").read().strip('\n') -# html_context allows us to pass arbitrary values into the html template -html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag} +html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl} # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/install-guide/source/conf.py b/doc/install-guide/source/conf.py index 053f18124b..b840582670 100644 --- a/doc/install-guide/source/conf.py +++ b/doc/install-guide/source/conf.py @@ -73,14 +73,18 @@ version = '0.1' # The full version, including alpha/beta/rc tags. release = '0.1' -# 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. +# pwd: source tree - this is needed only for openstackdocstheme <= 1.2.2 +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/install-guide/source' git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" gitsha = os.popen(git_cmd).read().strip('\n') -# source tree pwd = os.popen("pwd").read().strip('\n') -# html_context allows us to pass arbitrary values into the html template -html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag} +html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl} # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/networking-guide/source/conf.py b/doc/networking-guide/source/conf.py index 7bf576f03d..b2e94790bd 100644 --- a/doc/networking-guide/source/conf.py +++ b/doc/networking-guide/source/conf.py @@ -66,14 +66,18 @@ version = '0.9' # The full version, including alpha/beta/rc tags. release = '0.9' -# 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. +# pwd: source tree - this is needed only for openstackdocstheme <= 1.2.2 +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/networking-guide/source' git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" gitsha = os.popen(git_cmd).read().strip('\n') -# source tree pwd = os.popen("pwd").read().strip('\n') -# html_context allows us to pass arbitrary values into the html template -html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag} +html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl} # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/user-guide-admin/source/conf.py b/doc/user-guide-admin/source/conf.py index a82247164f..1734157128 100644 --- a/doc/user-guide-admin/source/conf.py +++ b/doc/user-guide-admin/source/conf.py @@ -69,14 +69,18 @@ version = '1.0.0' # The full version, including alpha/beta/rc tags. release = '1.0.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. +# pwd: source tree - this is needed only for openstackdocstheme <= 1.2.2 +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/user-guide-admin/source' git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" gitsha = os.popen(git_cmd).read().strip('\n') -# source tree pwd = os.popen("pwd").read().strip('\n') -# html_context allows us to pass arbitrary values into the html template -html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag} +html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl} # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/user-guide/source/conf.py b/doc/user-guide/source/conf.py index d1ed7b625a..382d4fdf0f 100644 --- a/doc/user-guide/source/conf.py +++ b/doc/user-guide/source/conf.py @@ -69,14 +69,18 @@ version = '1.0.0' # The full version, including alpha/beta/rc tags. release = '1.0.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. +# pwd: source tree - this is needed only for openstackdocstheme <= 1.2.2 +# These variables are passed to the logabug code via html_context. +giturl = u'http://git.openstack.org/cgit/openstack/openstack-manuals/tree/doc/user-guide/source' git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '" gitsha = os.popen(git_cmd).read().strip('\n') -# source tree pwd = os.popen("pwd").read().strip('\n') -# html_context allows us to pass arbitrary values into the html template -html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag} +html_context = {"pwd": pwd, "gitsha": gitsha, "bug_tag": bug_tag, + "giturl": giturl} # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/tox.ini b/tox.ini index 685cabb539..9bd857e87b 100644 --- a/tox.ini +++ b/tox.ini @@ -131,4 +131,4 @@ show-source = True # E123, E125 skipped as they are invalid PEP-8. ignore = E123,E125,H803 builtins = _ -exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/common/samples +exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,build,doc/common/samples,doc/*/source/conf.py