diff --git a/.zuul.yaml b/.zuul.yaml index b98e124..26accb0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -6,3 +6,4 @@ - openstack-python36-jobs - openstack-python37-jobs - publish-openstack-docs-pti + - release-notes-jobs-python3 diff --git a/README.rst b/README.rst index e70a97c..51d862f 100644 --- a/README.rst +++ b/README.rst @@ -20,9 +20,22 @@ A testr wrapper to provide functionality for OpenStack projects. Features -------- +.. warning:: + ``ostestr`` command is deprecated. Use `stestr`_ command instead like + following + + 0. Install `stestr`_ (This step is already done if you're using ostestr.) + 1. You can use ``stestr run ...`` instead of ``ostestr ...`` + 2. You can use ``stestr list ...`` instead of ``ostestr --list ...`` + + For more sub commands and options, please refer to `stestr help` or the + `stestr`_ document. + * ``ostestr``: a testr wrapper that uses subunit-trace for output and builds some helpful extra functionality around testr * ``subunit-trace``: an output filter for a subunit stream which provides useful information about the run * ``subunit2html``: generates a test results html page from a subunit stream * ``generate-subunit``: generate a subunit stream for a single test + +.. _stestr: https://stestr.readthedocs.io/ diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..af1aeb8 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,7 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. +openstackdocstheme>=1.18.1 # Apache-2.0 +reno>=2.5.0 # Apache-2.0 +sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD diff --git a/doc/source/user/ostestr.rst b/doc/source/user/ostestr.rst index 45728aa..0d67138 100644 --- a/doc/source/user/ostestr.rst +++ b/doc/source/user/ostestr.rst @@ -3,6 +3,19 @@ ostestr ======= +.. warning:: + ``ostestr`` command is deprecated. Use `stestr`_ command instead like + following. + + 0. Install `stestr`_ (This step is already done if you're using ostestr.) + 1. You can use ``stestr run ...`` instead of ``ostestr ...`` + 2. You can use ``stestr list ...`` instead of `ostestr --list ...`` + + For more sub commands and options, please refer to `stestr help` or the + `stestr`_ document. + +.. _stestr: https://stestr.readthedocs.io/ + The ostestr command provides a wrapper around the testr command included in the testrepository package. It's designed to build on the functionality included in testr and workaround several UI bugs in the short term. By default diff --git a/os_testr/ostestr.py b/os_testr/ostestr.py index 0b79d64..f09cecb 100755 --- a/os_testr/ostestr.py +++ b/os_testr/ostestr.py @@ -234,6 +234,10 @@ def _select_and_call_runner(opts, exclude_regex, others): def ostestr(args): + msg = ('Deprecate: ostestr command is deprecated now. Use stestr ' + 'command instead. For more information: ' + 'https://docs.openstack.org/os-testr/latest/user/ostestr.html') + warnings.warn(msg) opts, others = get_parser(args) if opts.pretty and opts.subunit: msg = ('Subunit output and pretty output cannot be specified at the ' diff --git a/releasenotes/notes/deprecate-ostestr-command-3ac0bff93265fa09.yaml b/releasenotes/notes/deprecate-ostestr-command-3ac0bff93265fa09.yaml new file mode 100644 index 0000000..321c162 --- /dev/null +++ b/releasenotes/notes/deprecate-ostestr-command-3ac0bff93265fa09.yaml @@ -0,0 +1,7 @@ +--- +deprecations: + - | + The ``ostestr`` command is now deprecated explicitly. We already switched + to use ``stestr`` command instead. And we haven't maintained this command + recently. For more information about stestr, see + https://stestr.readthedocs.io/en/latest/ diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py new file mode 100644 index 0000000..ba0ae6b --- /dev/null +++ b/releasenotes/source/conf.py @@ -0,0 +1,96 @@ +# 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. + +# Configuration file for the Sphinx documentation builder. +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# http://www.sphinx-doc.org/en/master/config + +# -- Path setup -------------------------------------------------------------- + +# 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. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- Project information ----------------------------------------------------- + +project = 'ostestr Release Notes' +copyright = '2019, ostestr Developers' +author = 'ostestr Developers' + + +# -- 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/os-testr' +bug_project = 'os-testr' +bug_tag = '' + +# Must set this variable to include year, month, day, hours, and minutes. +html_last_updated_fmt = '%Y-%m-%d %H:%M' + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# Release do not need a version number in the title, they +# cover multiple versions. +# The full version, including alpha/beta/rc tags. +release = '' +# The short X.Y version. +version = '' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# -- 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' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ['_static'] + +# Output file base name for HTML help builder. +htmlhelp_basename = 'ostestrReleaseNotesdoc' diff --git a/releasenotes/source/index.rst b/releasenotes/source/index.rst new file mode 100644 index 0000000..020e040 --- /dev/null +++ b/releasenotes/source/index.rst @@ -0,0 +1,14 @@ +====================== +os-testr Release Notes +====================== + +.. toctree:: + :maxdepth: 1 + + unreleased + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`search` diff --git a/releasenotes/source/unreleased.rst b/releasenotes/source/unreleased.rst new file mode 100644 index 0000000..875030f --- /dev/null +++ b/releasenotes/source/unreleased.rst @@ -0,0 +1,5 @@ +============================ +Current Series Release Notes +============================ + +.. release-notes:: diff --git a/test-requirements.txt b/test-requirements.txt index 4eb5d24..287b4ac 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,8 +5,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 testscenarios>=0.4 # Apache-2.0/BSD ddt>=1.0.1 # MIT diff --git a/tox.ini b/tox.ini index a6a4ae4..851a293 100644 --- a/tox.ini +++ b/tox.ini @@ -13,7 +13,7 @@ setenv = OS_TEST_TIMEOUT=500 whitelist_externals = find deps = - -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = @@ -41,12 +41,28 @@ commands = [testenv:docs] basepython = python3 +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt commands = python setup.py build_sphinx [testenv:debug] basepython = python3 commands = oslo_debug_helper {posargs} +[testenv:releasenotes] +basepython = python3 +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/doc/requirements.txt +commands = + rm -rf releasenotes/build + sphinx-build -a -E -W -d releasenotes/build/doctrees \ + -b html releasenotes/source releasenotes/build/html +whitelist_externals = rm + [flake8] # E123, E125 skipped as they are invalid PEP-8. # H405 skipped as it wrongly recognizes a multiline string as docstring