tox: Misc fixes
- Use 'ignore_basepython_conflict' so we can simply define 'basepython' on the base testenv - Add an '.stestr.conf' file, allowing us to stop specifying the '--test-path' argument manually - Call 'sphinx-build' directly instead of using the 'build_sphinx' distutils extension, which pbr is deprecating. This requires a fix to the docs but allows us to remove some noise from 'setup.cfg' - Fix some indentation and remove some unnecessary configuration Change-Id: Icc16ed943d8c0b9df01734da5642bf51e83314b8 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
dacb35cae2
commit
f35ffb70b5
|
@ -0,0 +1,3 @@
|
||||||
|
[DEFAULT]
|
||||||
|
test_path=./ec2api/tests/unit
|
||||||
|
top_dir=./
|
|
@ -15,7 +15,7 @@ Identity, Image.
|
||||||
install-sh.rst
|
install-sh.rst
|
||||||
install-manual.rst
|
install-manual.rst
|
||||||
install-devstack.rst
|
install-devstack.rst
|
||||||
|
install-ubuntu.rst
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
|
15
setup.cfg
15
setup.cfg
|
@ -25,10 +25,6 @@ classifier =
|
||||||
packages =
|
packages =
|
||||||
ec2api
|
ec2api
|
||||||
|
|
||||||
[global]
|
|
||||||
setup-hooks =
|
|
||||||
pbr.hooks.setup_hook
|
|
||||||
|
|
||||||
[entry_points]
|
[entry_points]
|
||||||
oslo.config.opts =
|
oslo.config.opts =
|
||||||
ec2api = ec2api.opts:list_opts
|
ec2api = ec2api.opts:list_opts
|
||||||
|
@ -36,23 +32,12 @@ oslo.config.opts =
|
||||||
keystoneauth1 = ec2api.opts:list_auth_opts
|
keystoneauth1 = ec2api.opts:list_auth_opts
|
||||||
ec2api.metadata = ec2api.metadata.opts:list_opts
|
ec2api.metadata = ec2api.metadata.opts:list_opts
|
||||||
ec2api.s3 = ec2api.s3.opts:list_opts
|
ec2api.s3 = ec2api.s3.opts:list_opts
|
||||||
|
|
||||||
console_scripts =
|
console_scripts =
|
||||||
ec2-api=ec2api.cmd.api:main
|
ec2-api=ec2api.cmd.api:main
|
||||||
ec2-api-manage=ec2api.cmd.manage:main
|
ec2-api-manage=ec2api.cmd.manage:main
|
||||||
ec2-api-metadata=ec2api.cmd.api_metadata:main
|
ec2-api-metadata=ec2api.cmd.api_metadata:main
|
||||||
ec2-api-s3=ec2api.cmd.api_s3:main
|
ec2-api-s3=ec2api.cmd.api_s3:main
|
||||||
|
|
||||||
[build_sphinx]
|
|
||||||
all_files = 1
|
|
||||||
build-dir = doc/build
|
|
||||||
source-dir = doc/source
|
|
||||||
|
|
||||||
[egg_info]
|
|
||||||
tag_build =
|
|
||||||
tag_date = 0
|
|
||||||
tag_svn_revision = 0
|
|
||||||
|
|
||||||
[compile_catalog]
|
[compile_catalog]
|
||||||
directory = ec2api/locale
|
directory = ec2api/locale
|
||||||
domain = ec2api
|
domain = ec2api
|
||||||
|
|
54
tox.ini
54
tox.ini
|
@ -1,46 +1,22 @@
|
||||||
[tox]
|
[tox]
|
||||||
minversion = 2.1
|
minversion = 3.1
|
||||||
envlist = py27,py37,pep8,docs,api-ref
|
envlist = pep8,py27,py37,docs,api-ref
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
# tox is silly... these need to be separated by a newline....
|
setenv =
|
||||||
whitelist_externals = bash
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
find
|
|
||||||
rm
|
|
||||||
env
|
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
|
||||||
LANG=en_US.UTF-8
|
|
||||||
LANGUAGE=en_US:en
|
|
||||||
LC_ALL=C
|
|
||||||
deps =
|
deps =
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
find . -type f -name "*.pyc" -delete
|
stestr run {posargs}
|
||||||
rm -f .testrepository/times.dbm
|
stestr slowest
|
||||||
|
|
||||||
[testenv:py27]
|
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
stestr --test-path 'ec2api/tests/unit' run '{posargs}'
|
|
||||||
stestr slowest
|
|
||||||
|
|
||||||
[testenv:py35]
|
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
stestr --test-path 'ec2api/tests/unit' run '{posargs}'
|
|
||||||
stestr slowest
|
|
||||||
|
|
||||||
[testenv:py36]
|
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
stestr --test-path 'ec2api/tests/unit' run '{posargs}'
|
|
||||||
stestr slowest
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
commands =
|
commands =
|
||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
|
|
||||||
|
@ -48,18 +24,20 @@ commands =
|
||||||
commands = oslo-config-generator --config-file=etc/ec2api/ec2api-config-generator.conf
|
commands = oslo-config-generator --config-file=etc/ec2api/ec2api-config-generator.conf
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
# This environment is called from CI scripts to test and publish
|
# This environment is called from CI scripts to test and publish
|
||||||
# the API Ref and Docs to docs.openstack.org.
|
# the API Ref and Docs to docs.openstack.org.
|
||||||
commands = python setup.py build_sphinx
|
whitelist_externals = rm
|
||||||
|
commands =
|
||||||
|
rm -rf doc/build
|
||||||
|
sphinx-build -W -b html -d doc/build/doctrees doc/source doc/build/html
|
||||||
|
|
||||||
[testenv:api-ref]
|
[testenv:api-ref]
|
||||||
# This environment is called from CI scripts to test and publish
|
# This environment is called from CI scripts to test and publish
|
||||||
# the API Ref to docs.openstack.org.
|
# the API Ref to docs.openstack.org.
|
||||||
|
whitelist_externals = rm
|
||||||
commands =
|
commands =
|
||||||
rm -rf api-ref/build
|
rm -rf api-ref/build
|
||||||
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
||||||
|
@ -69,7 +47,6 @@ commands =
|
||||||
# in sqlalchemy.
|
# in sqlalchemy.
|
||||||
# TODO Hacking 0.6 checks to fix
|
# TODO Hacking 0.6 checks to fix
|
||||||
# H102 Apache 2.0 license header not found
|
# H102 Apache 2.0 license header not found
|
||||||
|
|
||||||
ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H303,H404,F403,F811,F841
|
ignore = E121,E122,E123,E124,E126,E127,E128,E711,E712,H102,H303,H404,F403,F811,F841
|
||||||
# H106: Don't put vim configuration in source files
|
# H106: Don't put vim configuration in source files
|
||||||
# H203: Use assertIs(Not)None to check for None
|
# H203: Use assertIs(Not)None to check for None
|
||||||
|
@ -81,11 +58,6 @@ max-complexity=25
|
||||||
local-check-factory = ec2api.hacking.checks.factory
|
local-check-factory = ec2api.hacking.checks.factory
|
||||||
|
|
||||||
[testenv:lower-constraints]
|
[testenv:lower-constraints]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-c{toxinidir}/lower-constraints.txt
|
-c{toxinidir}/lower-constraints.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
|
||||||
{[testenv]commands}
|
|
||||||
stestr --test-path 'ec2api/tests/unit' run '{posargs}'
|
|
||||||
stestr slowest
|
|
||||||
|
|
Loading…
Reference in New Issue