summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.com>2017-11-17 10:21:08 +0100
committerAndreas Jaeger <aj@suse.com>2017-11-17 11:01:36 +0100
commit4eeffab026564f15390f8d661ef66703f4004c56 (patch)
tree6406b8b3ae27121438d4e7b851aee03e1b550d2e
parent7aa600e42f1c6464152cdcd7b21f6f26065e1e03 (diff)
Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release values. We've found that projects now require the service package to be installed in order to build release notes, and this is entirely due to the current convention of pulling in the version information. Release notes should not need installation in order to build, so this unnecessary version setting needs to be removed. Also, use openstackdocstheme for releasenotes. Fix linter failure I202 with rearranging imports. This is needed for new release notes publishing, see I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting at http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html . Change-Id: If3da3c9fe534fde2f04be7fa9602153126e9ac0d
Notes
Notes (review): Code-Review+2: Jesse Pretorius (odyssey4me) <jesse.pretorius@rackspace.co.uk> Code-Review+2: Major Hayden <major@mhtx.net> Workflow+1: Major Hayden <major@mhtx.net> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 17 Nov 2017 13:57:07 +0000 Reviewed-on: https://review.openstack.org/521031 Project: openstack/monitorstack Branch: refs/heads/master
-rw-r--r--monitorstack/utils/os_utils.py4
-rw-r--r--releasenotes/source/conf.py40
-rw-r--r--test-requirements.txt1
3 files changed, 14 insertions, 31 deletions
diff --git a/monitorstack/utils/os_utils.py b/monitorstack/utils/os_utils.py
index 11b8d6d..df449c2 100644
--- a/monitorstack/utils/os_utils.py
+++ b/monitorstack/utils/os_utils.py
@@ -14,6 +14,7 @@
14"""OpenStack-related utilities.""" 14"""OpenStack-related utilities."""
15 15
16import sys 16import sys
17from distutils.util import strtobool
17 18
18try: 19try:
19 if sys.version_info > (3, 2, 0): # pragma: no cover 20 if sys.version_info > (3, 2, 0): # pragma: no cover
@@ -22,7 +23,6 @@ try:
22 import urlparse 23 import urlparse
23except ImportError: # pragma: no cover 24except ImportError: # pragma: no cover
24 raise SystemExit('No urlparse module was found.') 25 raise SystemExit('No urlparse module was found.')
25
26try: 26try:
27 from openstack import connection as os_conn # pragma: no cover 27 from openstack import connection as os_conn # pragma: no cover
28except ImportError as e: # pragma: no cover 28except ImportError as e: # pragma: no cover
@@ -30,8 +30,6 @@ except ImportError as e: # pragma: no cover
30 ' Please install "python-openstacksdk".' 30 ' Please install "python-openstacksdk".'
31 ' ERROR: %s' % str(e)) 31 ' ERROR: %s' % str(e))
32 32
33from distutils.util import strtobool
34
35from monitorstack import utils 33from monitorstack import utils
36 34
37 35
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 30240fc..52f8659 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -23,8 +23,6 @@
23"""Release notes for monitorstack.""" 23"""Release notes for monitorstack."""
24import os 24import os
25 25
26import pbr.version
27
28# If extensions (or modules to document with autodoc) are in another directory, 26# If extensions (or modules to document with autodoc) are in another directory,
29# add these directories to sys.path here. If the directory is relative to the 27# add these directories to sys.path here. If the directory is relative to the
30# documentation root, use os.path.abspath to make it absolute, like shown here. 28# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -44,7 +42,7 @@ import pbr.version
44# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 42# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
45# ones. 43# ones.
46extensions = [ 44extensions = [
47 'oslosphinx', 45 'openstackdocstheme',
48 'reno.sphinxext', 46 'reno.sphinxext',
49] 47]
50 48
@@ -69,32 +67,18 @@ author = u'OpenStack-Ansible Contributors'
69oslosphinx_cgit_link = ('http://git.openstack.org/cgit/openstack' 67oslosphinx_cgit_link = ('http://git.openstack.org/cgit/openstack'
70 '/{0}'.format(project)) 68 '/{0}'.format(project))
71 69
72# The version info for the project you're documenting, acts as replacement for 70# Release notes do not need a version number in the title, they
73# |version| and |release|, also used in various other places throughout the 71# cover multiple releases.
74# built documents.
75#
76# The short X.Y version.
77version_info = pbr.version.VersionInfo(project)
78# The full version, including alpha/beta/rc tags. 72# The full version, including alpha/beta/rc tags.
79release = version_info.version_string_with_vcs() 73release = ''
80# The short X.Y version. 74# The short X.Y version.
81version = version_info.canonical_version_string() 75version = ''
82 76
83# A few variables have to be set for the log-a-bug feature. 77repository_name = 'openstack/monitorstack'
84# giturl: The location of conf.py on Git. Must be set manually. 78bug_project = 'monitorstack'
85# gitsha: The SHA checksum of the bug description. 79bug_tag = ''
86# Automatically extracted from git log. 80
87# bug_tag: Tag for categorizing the bug. Must be set manually. 81html_last_updated_fmt = '%Y-%m-%d %H:%M'
88# These variables are passed to the logabug code via html_context.
89giturl = ("http://git.openstack.org/cgit/openstack/{0}"
90 "/tree/doc/source").format(project)
91git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
92gitsha = os.popen(git_cmd).read().strip('\n')
93bug_project = project.lower()
94bug_title = "Documentation bug"
95html_context = {"gitsha": gitsha, "giturl": giturl,
96 "bug_tag": "docs", "bug_title": bug_title,
97 "bug_project": bug_project}
98 82
99# The language for content autogenerated by Sphinx. Refer to documentation 83# The language for content autogenerated by Sphinx. Refer to documentation
100# for a list of supported languages. 84# for a list of supported languages.
@@ -120,7 +104,7 @@ todo_include_todos = False
120# The theme to use for HTML and HTML Help pages. See the documentation for 104# The theme to use for HTML and HTML Help pages. See the documentation for
121# a list of builtin themes. 105# a list of builtin themes.
122# 106#
123html_theme = 'default' 107html_theme = 'openstackdocs'
124 108
125# Theme options are theme-specific and customize the look and feel of a theme 109# Theme options are theme-specific and customize the look and feel of a theme
126# further. For a list of options available for each theme, see the 110# further. For a list of options available for each theme, see the
diff --git a/test-requirements.txt b/test-requirements.txt
index 4f9dec0..8f7cf37 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -9,6 +9,7 @@ mock>=2.0 # BSD
9 9
10# this is required for the docs build jobs 10# this is required for the docs build jobs
11sphinx>=1.6.2 # BSD 11sphinx>=1.6.2 # BSD
12openstackdocstheme>=1.17.0 # Apache-2.0
12oslosphinx>=4.7.0 # Apache-2.0 13oslosphinx>=4.7.0 # Apache-2.0
13doc8 # Apache-2.0 14doc8 # Apache-2.0
14reno>=1.8.0 # Apache-2.0 15reno>=1.8.0 # Apache-2.0