trivial: refresh template with recent best practices

- add releasenotes to tox
- inherit requirements when is it possible in tox
- switch to hacking 2.x
- add gitignore rules related to reno

Change-Id: Id448fc31474fd29fb0799e96c5f1bb07c83f00bd
This commit is contained in:
Hervé Beraud 2020-02-11 16:44:40 +01:00
parent 07011c05c9
commit 6e71d437b5
10 changed files with 91 additions and 6 deletions

View File

@ -5,3 +5,4 @@
sphinx>=2.0 # BSD
openstackdocstheme>=1.20.0
sphinxcontrib-apidoc>=0.2.0 # BSD
reno>=2.5.0 # Apache-2.0

View File

@ -3,6 +3,7 @@
# process, which may cause wedges in the gate later.
Babel==1.3.0
hacking==0.10.0
hacking==2.0.0
mypy==0.720
oslotest==1.5.1
reno==2.5.0

View File

@ -0,0 +1,63 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# oslo.log Release Notes documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 3 17:40:50 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Project information --------------------------------------------------
# General information about the project.
copyright = u'2020, oslo.{{cookiecutter.module_name}} Developers'
# Release notes do not need a version in the title, they span
# multiple versions.
# The full version, including alpha/beta/rc tags.
release = ''
# The short X.Y version.
version = ''
# -- General configuration ------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'openstackdocstheme',
'reno.sphinxext',
]
# openstackdocstheme options
repository_name = 'openstack/oslo.{{cookiecutter.module_name}}'
bug_project = 'oslo.{{cookiecutter.module_name}}'
bug_tag = ''
# The master toctree document.
master_doc = 'index'
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'openstackdocs'
# -- Options for Internationalization output ------------------------------
locale_dirs = ['locale/']

View File

@ -0,0 +1,8 @@
=============================
oslo.messaging Release Notes
=============================
.. toctree::
:maxdepth: 1
unreleased

View File

@ -0,0 +1,5 @@
============================
Current Series Release Notes
============================
.. release-notes::

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking<0.11,>=0.10.0
hacking>=3.0,<3.1.0 # Apache-2.0
mypy>=0.720 # MIT
oslotest>=1.5.1
stestr>=2.0.0 # Apache-2.0

View File

@ -37,12 +37,19 @@ commands =
[testenv:docs]
whitelist_externals =
rm
commands =
rm -rf doc/build doc/source/reference/api
sphinx-build -W -b html doc/source doc/build/html
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build doc/source/reference/api
sphinx-build -W --keep-going -b html doc/source doc/build/html {posargs}
[testenv:releasenotes]
whitelist_externals = rm
deps = {[testenv:docs]deps}
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
[testenv:mypy]
commands =

View File

@ -30,4 +30,4 @@ def test_api():
pass
EOF
tox -e pep8,py36,docs,lower-constraints,cover
tox -e pep8,py36,docs,lower-constraints,cover,releasenotes