summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Pretorius <jesse.pretorius@rackspace.co.uk>2016-07-09 11:54:34 +0100
committerJesse Pretorius <jesse.pretorius@rackspace.co.uk>2016-07-09 12:12:32 +0100
commit7abca6026883ba098185042b2936c1a173202864 (patch)
tree1af7375e8e75b3f22df1667428113f146b349f19
parent2858aa0656cf47e27c62738472568702adb77ebe (diff)
Update sphinx configuration
This patch updates the sphinx configuration for docs and releasenotes to make it easier to replicate across repositories and to comply with pep8 testing without exceptions. Change-Id: I428a78d781a35e43d53bbcdaeb94658b5e0c91a7
Notes
Notes (review): Code-Review+2: Travis Truman (automagically) <travis_truman@cable.comcast.com> Code-Review+2: Kevin Carter (cloudnull) <kevin.carter@rackspace.com> Workflow+1: Kevin Carter (cloudnull) <kevin.carter@rackspace.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 12 Jul 2016 14:37:00 +0000 Reviewed-on: https://review.openstack.org/339993 Project: openstack/openstack-ansible-memcached_server Branch: refs/heads/master
-rw-r--r--doc/source/conf.py61
-rw-r--r--releasenotes/source/conf.py43
2 files changed, 63 insertions, 41 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index ee5ca23..2bed75a 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -1,9 +1,18 @@
1#!/usr/bin/env python3 1#!/usr/bin/env python3
2# -*- coding: utf-8 -*- 2
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
3# 6#
4# openstack-ansible-memcached_server documentation build configuration file, created by 7# http://www.apache.org/licenses/LICENSE-2.0
5# sphinx-quickstart on Mon Apr 13 20:42:26 2015.
6# 8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12# implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
7# This file is execfile()d with the current directory set to its 16# This file is execfile()d with the current directory set to its
8# containing dir. 17# containing dir.
9# 18#
@@ -13,6 +22,8 @@
13# All configuration values have a default; values that are commented out 22# All configuration values have a default; values that are commented out
14# serve to show the default. 23# serve to show the default.
15 24
25import pbr.version
26
16# If extensions (or modules to document with autodoc) are in another directory, 27# If extensions (or modules to document with autodoc) are in another directory,
17# add these directories to sys.path here. If the directory is relative to the 28# add these directories to sys.path here. If the directory is relative to the
18# documentation root, use os.path.abspath to make it absolute, like shown here. 29# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -31,9 +42,6 @@ extensions = [
31 'oslosphinx' 42 'oslosphinx'
32] 43]
33 44
34# The link to the browsable source code (for the left hand menu)
35oslosphinx_cgit_link = 'http://git.openstack.org/cgit/openstack/openstack-ansible-memcached_server'
36
37# Add any paths that contain templates here, relative to this directory. 45# Add any paths that contain templates here, relative to this directory.
38templates_path = ['_templates'] 46templates_path = ['_templates']
39 47
@@ -49,18 +57,28 @@ source_suffix = '.rst'
49master_doc = 'index' 57master_doc = 'index'
50 58
51# General information about the project. 59# General information about the project.
52project = 'openstack-ansible-memcached_server' 60author = 'OpenStack-Ansible Contributors'
53copyright = '2015, openstack-ansible-memcached_server contributors' 61category = 'Miscellaneous'
54author = 'openstack-ansible-memcached_server contributors' 62copyright = '2014-2016, OpenStack-Ansible Contributors'
63description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
64project = 'OpenStack-Ansible'
65role_name = 'memcached_server'
66target_name = 'openstack-ansible-' + role_name
67title = 'OpenStack-Ansible Documentation: ' + role_name + 'role'
68
69# The link to the browsable source code (for the left hand menu)
70oslosphinx_cgit_link = 'http://git.openstack.org/cgit/openstack/' + target_name
55 71
56# The version info for the project you're documenting, acts as replacement for 72# The version info for the project you're documenting, acts as replacement for
57# |version| and |release|, also used in various other places throughout the 73# |version| and |release|, also used in various other places throughout the
58# built documents. 74# built documents.
59# 75#
60# The short X.Y version. 76# The short X.Y version.
61version = 'master' 77version_info = pbr.version.VersionInfo(target_name)
62# The full version, including alpha/beta/rc tags. 78# The full version, including alpha/beta/rc tags.
63release = 'master' 79release = version_info.version_string_with_vcs()
80# The short X.Y version.
81version = version_info.canonical_version_string()
64 82
65# The language for content autogenerated by Sphinx. Refer to documentation 83# The language for content autogenerated by Sphinx. Refer to documentation
66# for a list of supported languages. 84# for a list of supported languages.
@@ -149,7 +167,7 @@ html_static_path = ['_static']
149 167
150# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 168# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
151# using the given strftime format. 169# using the given strftime format.
152# html_last_updated_fmt = '%b %d, %Y' 170html_last_updated_fmt = '%Y-%m-%d %H:%M'
153 171
154# If true, SmartyPants will be used to convert quotes and dashes to 172# If true, SmartyPants will be used to convert quotes and dashes to
155# typographically correct entities. 173# typographically correct entities.
@@ -203,7 +221,7 @@ html_static_path = ['_static']
203# html_search_scorer = 'scorer.js' 221# html_search_scorer = 'scorer.js'
204 222
205# Output file base name for HTML help builder. 223# Output file base name for HTML help builder.
206htmlhelp_basename = 'openstack-ansible-memcached_serverdoc' 224htmlhelp_basename = target_name + '-docs'
207 225
208# -- Options for LaTeX output --------------------------------------------- 226# -- Options for LaTeX output ---------------------------------------------
209 227
@@ -225,9 +243,8 @@ latex_elements = {
225# (source start file, target name, title, 243# (source start file, target name, title,
226# author, documentclass [howto, manual, or own class]). 244# author, documentclass [howto, manual, or own class]).
227latex_documents = [ 245latex_documents = [
228 (master_doc, 'openstack-ansible-memcached_server.tex', 246 (master_doc, target_name + '.tex',
229 'openstack-ansible-memcached_server Documentation', 247 title, author, 'manual'),
230 'openstack-ansible-memcached_server contributors', 'manual'),
231] 248]
232 249
233# The name of an image file (relative to this directory) to place at the top of 250# The name of an image file (relative to this directory) to place at the top of
@@ -256,9 +273,8 @@ latex_documents = [
256# One entry per manual page. List of tuples 273# One entry per manual page. List of tuples
257# (source start file, name, description, authors, manual section). 274# (source start file, name, description, authors, manual section).
258man_pages = [ 275man_pages = [
259 (master_doc, 'openstack-ansible-memcached_server', 276 (master_doc, target_name,
260 'openstack-ansible-memcached_server Documentation', 277 title, [author], 1)
261 [author], 1)
262] 278]
263 279
264# If true, show URL addresses after external links. 280# If true, show URL addresses after external links.
@@ -271,10 +287,9 @@ man_pages = [
271# (source start file, target name, title, author, 287# (source start file, target name, title, author,
272# dir menu entry, description, category) 288# dir menu entry, description, category)
273texinfo_documents = [ 289texinfo_documents = [
274 (master_doc, 'openstack-ansible-memcached_server', 290 (master_doc, target_name,
275 'openstack-ansible-memcached_server Documentation', 291 title, author, project,
276 author, 'openstack-ansible-memcached_server', 'One line description of project.', 292 description, category),
277 'Miscellaneous'),
278] 293]
279 294
280# Documents to append as an appendix to all manuals. 295# Documents to append as an appendix to all manuals.
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 4b174bf..d8f47e6 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -1,4 +1,5 @@
1# -*- coding: utf-8 -*- 1#!/usr/bin/env python3
2
2# Licensed under the Apache License, Version 2.0 (the "License"); 3# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License. 4# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at 5# You may obtain a copy of the License at
@@ -12,9 +13,6 @@
12# See the License for the specific language governing permissions and 13# See the License for the specific language governing permissions and
13# limitations under the License. 14# limitations under the License.
14 15
15# PROJECT_NAME Release Notes documentation build configuration file, created by
16# sphinx-quickstart on Tue Nov 3 17:40:50 2015.
17#
18# This file is execfile()d with the current directory set to its 16# This file is execfile()d with the current directory set to its
19# containing dir. 17# containing dir.
20# 18#
@@ -24,6 +22,8 @@
24# All configuration values have a default; values that are commented out 22# All configuration values have a default; values that are commented out
25# serve to show the default. 23# serve to show the default.
26 24
25import pbr.version
26
27# If extensions (or modules to document with autodoc) are in another directory, 27# If extensions (or modules to document with autodoc) are in another directory,
28# add these directories to sys.path here. If the directory is relative to the 28# add these directories to sys.path here. If the directory is relative to the
29# documentation root, use os.path.abspath to make it absolute, like shown here. 29# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -55,16 +55,24 @@ source_suffix = '.rst'
55master_doc = 'index' 55master_doc = 'index'
56 56
57# General information about the project. 57# General information about the project.
58project = u'OpenStack-Ansible Release Notes' 58author = 'OpenStack-Ansible Contributors'
59copyright = u'2015, OpenStack-Ansible Developers' 59category = 'Miscellaneous'
60copyright = '2014-2016, OpenStack-Ansible Contributors'
61description = 'OpenStack-Ansible deploys OpenStack environments using Ansible.'
62project = 'OpenStack-Ansible'
63role_name = 'memcached_server'
64target_name = 'openstack-ansible-' + role_name
65title = 'OpenStack-Ansible Release Notes: ' + role_name + 'role'
66
67# The link to the browsable source code (for the left hand menu)
68oslosphinx_cgit_link = 'http://git.openstack.org/cgit/openstack/' + target_name
60 69
61# The version info for the project you're documenting, acts as replacement for 70# The version info for the project you're documenting, acts as replacement for
62# |version| and |release|, also used in various other places throughout the 71# |version| and |release|, also used in various other places throughout the
63# built documents. 72# built documents.
64# 73#
65# The short X.Y version. 74# The short X.Y version.
66import pbr.version 75version_info = pbr.version.VersionInfo(target_name)
67version_info = pbr.version.VersionInfo('openstack-ansible-memcached_server')
68# The full version, including alpha/beta/rc tags. 76# The full version, including alpha/beta/rc tags.
69release = version_info.version_string_with_vcs() 77release = version_info.version_string_with_vcs()
70# The short X.Y version. 78# The short X.Y version.
@@ -151,7 +159,7 @@ html_static_path = ['_static']
151 159
152# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 160# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
153# using the given strftime format. 161# using the given strftime format.
154# html_last_updated_fmt = '%b %d, %Y' 162html_last_updated_fmt = '%Y-%m-%d %H:%M'
155 163
156# If true, SmartyPants will be used to convert quotes and dashes to 164# If true, SmartyPants will be used to convert quotes and dashes to
157# typographically correct entities. 165# typographically correct entities.
@@ -191,7 +199,7 @@ html_static_path = ['_static']
191# html_file_suffix = None 199# html_file_suffix = None
192 200
193# Output file base name for HTML help builder. 201# Output file base name for HTML help builder.
194htmlhelp_basename = 'OpenStackAnsibleReleaseNotesdoc' 202htmlhelp_basename = target_name + '-docs'
195 203
196 204
197# -- Options for LaTeX output --------------------------------------------- 205# -- Options for LaTeX output ---------------------------------------------
@@ -211,8 +219,8 @@ latex_elements = {
211# (source start file, target name, title, 219# (source start file, target name, title,
212# author, documentclass [howto, manual, or own class]). 220# author, documentclass [howto, manual, or own class]).
213latex_documents = [ 221latex_documents = [
214 ('index', 'OpenStackAnsibleReleaseNotes.tex', u'OpenStack-Ansible Release Notes Documentation', 222 (master_doc, target_name + '.tex',
215 u'OpenStack-Ansible Developers', 'manual'), 223 title, author, 'manual'),
216] 224]
217 225
218# The name of an image file (relative to this directory) to place at the top of 226# The name of an image file (relative to this directory) to place at the top of
@@ -241,8 +249,8 @@ latex_documents = [
241# One entry per manual page. List of tuples 249# One entry per manual page. List of tuples
242# (source start file, name, description, authors, manual section). 250# (source start file, name, description, authors, manual section).
243man_pages = [ 251man_pages = [
244 ('index', 'openstackansiblereleasenotes', u'OpenStack-Ansible Release Notes Documentation', 252 (master_doc, target_name,
245 [u'OpenStack-Ansible Developers'], 1) 253 title, [author], 1)
246] 254]
247 255
248# If true, show URL addresses after external links. 256# If true, show URL addresses after external links.
@@ -255,10 +263,9 @@ man_pages = [
255# (source start file, target name, title, author, 263# (source start file, target name, title, author,
256# dir menu entry, description, category) 264# dir menu entry, description, category)
257texinfo_documents = [ 265texinfo_documents = [
258 ('index', 'OpenStackAnsibleReleaseNotes', u'OpenStack-Ansible Release Notes Documentation', 266 (master_doc, target_name,
259 u'OpenStack-Ansible Developers', 'OpenStackAnsibleReleaseNotes', 267 title, author, project,
260 'One line description of project.', 268 description, category),
261 'Miscellaneous'),
262] 269]
263 270
264# Documents to append as an appendix to all manuals. 271# Documents to append as an appendix to all manuals.