0c19a79fbd
Baseline changes to comply with OpenStack API documentation from OpenStack Documentation Contributor Guide [0]: - [1] How to document your OpenStack API service [0] https://docs.openstack.org/doc-contrib-guide [1] https://docs.openstack.org/doc-contrib-guide/api-guides.html Story: 2002712 Task: 26621 Change-Id: Ie2bc6b177a8cdff1c844696b89f954cead76e830 Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
137 lines
3.8 KiB
INI
137 lines
3.8 KiB
INI
[tox]
|
|
envlist = linters,pep8
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_TEST_TIMEOUT=60
|
|
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
|
# DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
|
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
#deps = keyring
|
|
# -r{toxinidir}/requirements.txt
|
|
# -r{toxinidir}/test-requirements.txt
|
|
# -e{toxinidir}/../../middleware/config/recipes-common/tsconfig/tsconfig
|
|
# -e{toxinidir}/../../middleware/config/recipes-control/configutilities/configutilities
|
|
# -e{toxinidir}/../../middleware/sysinv/recipes-common/sysinv/sysinv
|
|
# -e{toxinidir}/../../middleware/fault/recipes-common/fm-api
|
|
# -e{toxinidir}/../../middleware/patching/recipes-common/cgcs-patch/cgcs-patch
|
|
# -e{toxinidir}/../../middleware/sysinv/recipes-common/cgts-client/cgts-client
|
|
# -e{toxinidir}/../../recipes-nfv/nfv/nfv-client
|
|
|
|
whitelist_externals =
|
|
rm
|
|
find
|
|
reno
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
|
|
[testenv:py27-single]
|
|
basepython = python2.7
|
|
setenv =
|
|
CURRENT_CFG_FILE={toxinidir}/.current.cfg
|
|
DATA_DIRECTORY={env:MY_REPO}/addons/wr-cgcs/layers/cgcs/extras.ND/ddt_data/distributed_cloud
|
|
SINGLE_REPO=True
|
|
|
|
[testenv:debug-py27]
|
|
basepython = python2.7
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-py34]
|
|
basepython = python3.4
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:pep8]
|
|
deps = hacking<0.11,>=0.10.2
|
|
commands = flake8
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
basepython = python2.7
|
|
usedevelop = True
|
|
commands =
|
|
coverage erase
|
|
rm -Rf cover
|
|
rm -f coverage.xml
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
coverage xml --rcfile=.coveragerc_xml
|
|
|
|
[testenv:docs]
|
|
basepython = python3
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
|
|
whitelist_externals = rm
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
deps = -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
|
|
|
|
[testenv:newnote]
|
|
# Re-use the releasenotes venv
|
|
envdir = {toxworkdir}/releasenotes
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
commands = reno new {posargs}
|
|
|
|
[testenv:api-ref]
|
|
basepython = python3
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
rm -rf api-ref/build
|
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
|
whitelist_externals = rm
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
show-source = True
|
|
ignore = E123,E125,H233
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build
|
|
|
|
[testenv:genconfig]
|
|
commands =
|
|
oslo-config-generator --config-file=tools/config-generator.conf
|
|
|
|
[hacking]
|
|
import_exceptions = dcmanager.common.i18n,dcorch.common.i18n
|
|
|
|
[testenv:pylint]
|
|
basepython = python2.7
|
|
sitepackages = False
|
|
|
|
deps = {[testenv]deps}
|
|
|
|
commands =
|
|
pylint {posargs} dcmanager dcorch --rcfile=./pylint.rc
|
|
|
|
[testenv:linters]
|
|
# bashate ignore:
|
|
# E006 - accept long lines
|
|
# E040 - false positive on |& syntax (new in bash 4)
|
|
whitelist_externals = bash
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
\( -name .tox -prune \) \
|
|
-o -type f -name '*.yaml' \
|
|
-print0 | xargs -0 yamllint"
|