Browse Source

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
changes/31/521031/3
Andreas Jaeger 1 year ago
parent
commit
4eeffab026
3 changed files with 14 additions and 31 deletions
  1. 1
    3
      monitorstack/utils/os_utils.py
  2. 12
    28
      releasenotes/source/conf.py
  3. 1
    0
      test-requirements.txt

+ 1
- 3
monitorstack/utils/os_utils.py View File

@@ -14,6 +14,7 @@
14 14
 """OpenStack-related utilities."""
15 15
 
16 16
 import sys
17
+from distutils.util import strtobool
17 18
 
18 19
 try:
19 20
     if sys.version_info > (3, 2, 0):  # pragma: no cover
@@ -22,7 +23,6 @@ try:
22 23
         import urlparse
23 24
 except ImportError:  # pragma: no cover
24 25
         raise SystemExit('No urlparse module was found.')
25
-
26 26
 try:
27 27
     from openstack import connection as os_conn  # pragma: no cover
28 28
 except ImportError as e:  # pragma: no cover
@@ -30,8 +30,6 @@ except ImportError as e:  # pragma: no cover
30 30
                      ' Please install "python-openstacksdk".'
31 31
                      ' ERROR: %s' % str(e))
32 32
 
33
-from distutils.util import strtobool
34
-
35 33
 from monitorstack import utils
36 34
 
37 35
 

+ 12
- 28
releasenotes/source/conf.py View File

@@ -23,8 +23,6 @@
23 23
 """Release notes for monitorstack."""
24 24
 import os
25 25
 
26
-import pbr.version
27
-
28 26
 # If extensions (or modules to document with autodoc) are in another directory,
29 27
 # add these directories to sys.path here. If the directory is relative to the
30 28
 # documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -44,7 +42,7 @@ import pbr.version
44 42
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
45 43
 # ones.
46 44
 extensions = [
47
-    'oslosphinx',
45
+    'openstackdocstheme',
48 46
     'reno.sphinxext',
49 47
 ]
50 48
 
@@ -69,32 +67,18 @@ author = u'OpenStack-Ansible Contributors'
69 67
 oslosphinx_cgit_link = ('http://git.openstack.org/cgit/openstack'
70 68
                         '/{0}'.format(project))
71 69
 
72
-# The version info for the project you're documenting, acts as replacement for
73
-# |version| and |release|, also used in various other places throughout the
74
-# built documents.
75
-#
76
-# The short X.Y version.
77
-version_info = pbr.version.VersionInfo(project)
70
+# Release notes do not need a version number in the title, they
71
+# cover multiple releases.
78 72
 # The full version, including alpha/beta/rc tags.
79
-release = version_info.version_string_with_vcs()
73
+release = ''
80 74
 # The short X.Y version.
81
-version = version_info.canonical_version_string()
82
-
83
-# A few variables have to be set for the log-a-bug feature.
84
-#   giturl: The location of conf.py on Git. Must be set manually.
85
-#   gitsha: The SHA checksum of the bug description.
86
-#           Automatically extracted from git log.
87
-#   bug_tag: Tag for categorizing the bug. Must be set manually.
88
-# These variables are passed to the logabug code via html_context.
89
-giturl = ("http://git.openstack.org/cgit/openstack/{0}"
90
-          "/tree/doc/source").format(project)
91
-git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
92
-gitsha = os.popen(git_cmd).read().strip('\n')
93
-bug_project = project.lower()
94
-bug_title = "Documentation bug"
95
-html_context = {"gitsha": gitsha, "giturl": giturl,
96
-                "bug_tag": "docs", "bug_title": bug_title,
97
-                "bug_project": bug_project}
75
+version = ''
76
+
77
+repository_name = 'openstack/monitorstack'
78
+bug_project = 'monitorstack'
79
+bug_tag = ''
80
+
81
+html_last_updated_fmt = '%Y-%m-%d %H:%M'
98 82
 
99 83
 # The language for content autogenerated by Sphinx. Refer to documentation
100 84
 # for a list of supported languages.
@@ -120,7 +104,7 @@ todo_include_todos = False
120 104
 # The theme to use for HTML and HTML Help pages.  See the documentation for
121 105
 # a list of builtin themes.
122 106
 #
123
-html_theme = 'default'
107
+html_theme = 'openstackdocs'
124 108
 
125 109
 # Theme options are theme-specific and customize the look and feel of a theme
126 110
 # further.  For a list of options available for each theme, see the

+ 1
- 0
test-requirements.txt View File

@@ -9,6 +9,7 @@ mock>=2.0  # BSD
9 9
 
10 10
 # this is required for the docs build jobs
11 11
 sphinx>=1.6.2 # BSD
12
+openstackdocstheme>=1.17.0  # Apache-2.0
12 13
 oslosphinx>=4.7.0 # Apache-2.0
13 14
 doc8 # Apache-2.0
14 15
 reno>=1.8.0 # Apache-2.0

Loading…
Cancel
Save