Adds tooling and enhances README documentation around the backlog specs process. - To move a spec from the backlog to the current release, we can now use the ``move-spec`` tox target, e.g. tox -e move-spec -- [-n] [-v] specs/backlog/approved/great-idea.rst specs/train/approved - To abandon a backlog spec - i.e. move it from specs/backlog/approved to the (new) specs/abandoned directory, we can now use the ``abandon-spec`` tox target, e.g. tox -e abandon-spec -- [-n] [-v] specs/backlog/it-was-a-great-idea.rst These utilities will move the specified spec into the target directory and create an appropriate redirect for it. To make it so, this commit factors out a helper method that a) moves a spec from one subdirectory to another and b) adds a redirect for it. This is used by the existing ``move-implemented-specs`` utility as well as the new ``move-spec`` and ``abandon-spec``. While I was in here, I spruced up the verbose output (including for move-implemented-specs) to be a bit more readable. Change-Id: I322eecbacd5dc52accf6ac69c9fe1116be8c216f
62 lines
1.5 KiB
INI
62 lines
1.5 KiB
INI
[tox]
|
|
envlist = docs,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
install_command = pip install -U {opts} {packages}
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
whitelist_externals = find
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:pep8]
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
stestr run --slowest {posargs}
|
|
flake8 {posargs}
|
|
|
|
[flake8]
|
|
ignore = E128
|
|
exclude = .venv,.git,.tox,doc,.eggs
|
|
|
|
[testenv:move-implemented-specs]
|
|
# NOTE(mriedem): simplejson is used by launchpadlib but is a lazy import and
|
|
# fails if we don't have it.
|
|
deps = launchpadlib
|
|
simplejson
|
|
envdir={toxworkdir}/launchpadlib
|
|
commands =
|
|
python {toxinidir}/tools/move_implemented_specs.py {posargs}
|
|
|
|
[testenv:count-blueprints]
|
|
deps = {[testenv:move-implemented-specs]deps}
|
|
envdir={toxworkdir}/launchpadlib
|
|
commands =
|
|
python {toxinidir}/tools/count_blueprints.py {posargs}
|
|
|
|
[testenv:move-spec]
|
|
# Usage:
|
|
# tox -e move-spec -- [--dry-run] [--verbose] path/to/spec.rst path/to/destdir
|
|
deps=
|
|
envdir={toxworkdir}/nodeps
|
|
commands =
|
|
python {toxinidir}/tools/move_spec.py {posargs}
|
|
|
|
[testenv:abandon-spec]
|
|
# Usage:
|
|
# tox -e abandon-spec -- [--dry-run] [--verbose] path/to/obsolete-spec.rst
|
|
deps=
|
|
envdir={toxworkdir}/nodeps
|
|
commands =
|
|
python {toxinidir}/tools/abandon_spec.py {posargs}
|