2012-05-08 17:39:08 -04:00
|
|
|
[tox]
|
2014-11-25 16:56:56 +01:00
|
|
|
envlist = py27,pep8
|
2013-12-09 13:53:45 +01:00
|
|
|
minversion = 1.6
|
|
|
|
skipsdist = True
|
2012-05-08 17:39:08 -04:00
|
|
|
|
|
|
|
[testenv]
|
2014-07-25 15:10:33 -07:00
|
|
|
# Note the hash seed is set to 0 until heat can be tested with a
|
|
|
|
# random hash seed successfully.
|
2012-05-08 17:39:08 -04:00
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
2014-07-25 15:10:33 -07:00
|
|
|
PYTHONHASHSEED=0
|
2013-12-09 13:53:45 +01:00
|
|
|
usedevelop = True
|
|
|
|
install_command = pip install {opts} {packages}
|
2013-05-15 21:48:36 -07:00
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
2013-04-24 20:07:37 -07:00
|
|
|
commands =
|
2014-08-25 10:37:27 +12:00
|
|
|
python setup.py testr --slowest --testr-args='^(?!heat_integrationtests) {posargs}'
|
2013-09-09 18:02:49 -05:00
|
|
|
|
2014-03-31 21:39:28 +02:00
|
|
|
whitelist_externals = bash
|
|
|
|
|
2014-08-25 10:37:27 +12:00
|
|
|
[testenv:integration]
|
2014-08-25 10:37:20 +12:00
|
|
|
commands =
|
2014-08-25 10:37:27 +12:00
|
|
|
python setup.py testr --slowest --testr-args='--concurrency=1 ^heat_integrationtests {posargs}'
|
2014-08-25 10:37:20 +12:00
|
|
|
|
2012-05-08 17:39:08 -04:00
|
|
|
[testenv:pep8]
|
2013-07-10 16:01:00 +02:00
|
|
|
commands =
|
2014-08-25 10:37:27 +12:00
|
|
|
flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib heat_integrationtests
|
2014-03-31 21:39:28 +02:00
|
|
|
# Check that .po and .pot files are valid:
|
|
|
|
bash -c "find heat -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
2012-05-08 17:39:08 -04:00
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
commands = {posargs}
|
|
|
|
|
2012-05-17 16:02:04 -04:00
|
|
|
[testenv:cover]
|
2013-04-24 20:07:37 -07:00
|
|
|
commands =
|
2014-10-23 14:58:30 +01:00
|
|
|
python setup.py testr --coverage --testr-args='^(?!heat_integrationtests) {posargs}'
|
2013-05-11 14:26:42 -04:00
|
|
|
|
2013-08-23 12:09:58 +10:00
|
|
|
[testenv:docs]
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
sphinxcontrib-httpdomain
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
2014-10-14 21:17:52 +01:00
|
|
|
[testenv:genconfig]
|
|
|
|
commands =
|
|
|
|
bash tools/config/generate_sample.sh -b . -p heat -o etc/heat
|
|
|
|
|
2013-05-11 14:26:42 -04:00
|
|
|
[flake8]
|
2013-06-11 13:05:51 +10:00
|
|
|
# H404 multi line docstring should start with a summary
|
2014-04-04 16:44:30 +03:00
|
|
|
# H803 no full stop at the end of the commit message
|
2014-11-25 19:16:46 +03:00
|
|
|
ignore = H404,H803
|
2013-05-11 14:26:42 -04:00
|
|
|
show-source = true
|
2013-08-22 11:42:31 +10:00
|
|
|
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
2014-10-17 14:20:09 +10:00
|
|
|
# 28 is currently the most complex thing we have
|
|
|
|
# TODO(asalkeld): get this number down to 20
|
|
|
|
max-complexity=29
|
2014-10-21 16:11:34 +08:00
|
|
|
|
|
|
|
[hacking]
|
|
|
|
import_exceptions = heat.common.i18n
|