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
This commit is contained in:
Andreas Jaeger 2017-11-17 10:21:08 +01:00
parent 7aa600e42f
commit 4eeffab026
3 changed files with 13 additions and 30 deletions

View File

@ -14,6 +14,7 @@
"""OpenStack-related utilities."""
import sys
from distutils.util import strtobool
try:
if sys.version_info > (3, 2, 0): # pragma: no cover
@ -22,7 +23,6 @@ try:
import urlparse
except ImportError: # pragma: no cover
raise SystemExit('No urlparse module was found.')
try:
from openstack import connection as os_conn # pragma: no cover
except ImportError as e: # pragma: no cover
@ -30,8 +30,6 @@ except ImportError as e: # pragma: no cover
' Please install "python-openstacksdk".'
' ERROR: %s' % str(e))
from distutils.util import strtobool
from monitorstack import utils

View File

@ -23,8 +23,6 @@
"""Release notes for monitorstack."""
import os
import pbr.version
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -44,7 +42,7 @@ import pbr.version
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'oslosphinx',
'openstackdocstheme',
'reno.sphinxext',
]
@ -69,32 +67,18 @@ author = u'OpenStack-Ansible Contributors'
oslosphinx_cgit_link = ('http://git.openstack.org/cgit/openstack'
'/{0}'.format(project))
# 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.
#
# The short X.Y version.
version_info = pbr.version.VersionInfo(project)
# Release notes do not need a version number in the title, they
# cover multiple releases.
# The full version, including alpha/beta/rc tags.
release = version_info.version_string_with_vcs()
release = ''
# The short X.Y version.
version = version_info.canonical_version_string()
version = ''
# 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 = ("http://git.openstack.org/cgit/openstack/{0}"
"/tree/doc/source").format(project)
git_cmd = "/usr/bin/git log | head -n1 | cut -f2 -d' '"
gitsha = os.popen(git_cmd).read().strip('\n')
bug_project = project.lower()
bug_title = "Documentation bug"
html_context = {"gitsha": gitsha, "giturl": giturl,
"bug_tag": "docs", "bug_title": bug_title,
"bug_project": bug_project}
repository_name = 'openstack/monitorstack'
bug_project = 'monitorstack'
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -120,7 +104,7 @@ todo_include_todos = False
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = 'openstackdocs'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the

View File

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