<commit_before>[tox]
envlist = py35,py34,py27,pep8
minversion = 1.6
skipsdist = True

[testenv]
usedevelop = True
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
         PYTHONDONTWRITEBYTECODE = 1
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps = -r{toxinidir}/test-requirements.txt
commands =
  find . -type f -name "*.pyc" -delete
  python setup.py testr --slowest --testr-args='{posargs}'
whitelist_externals =
  rm
  find

[testenv:unit-postgresql]
setenv = VIRTUAL_ENV={envdir}
passenv = <PASSWORD>
commands = ./run_tests.sh -V --db-type postgresql

[testenv:pep8]
commands = flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py

[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
setenv = VIRTUAL_ENV={envdir}
commands =
  python setup.py testr --coverage \
    --testr-args='^(?!.*test.*coverage).*$'
  coverage report

[testenv:genconfig]
commands =
    oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
    --output-file etc/mistral.conf.sample

#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:venv]
setenv = PYTHONHASHSEED=0
commands = {posargs}

#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:docs]
setenv = PYTHONHASHSEED=0
commands = python setup.py build_sphinx

[testenv:pylint]
setenv = VIRTUAL_ENV={envdir}
commands = bash tools/lintstack.sh

[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

#Skip PEP257 violation.
[flake8]
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts

[hacking]
local-check-factory = mistral.hacking.checks.factory
<commit_msg>Enable DeprecationWarning in test environments<commit_after>[tox]
envlist = py35,py34,py27,pep8
minversion = 1.6
skipsdist = True

[testenv]
usedevelop = True
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
         PYTHONDONTWRITEBYTECODE = 1
         PYTHONWARNINGS=default::DeprecationWarning
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps = -r{toxinidir}/test-requirements.txt
commands =
  find . -type f -name "*.pyc" -delete
  python setup.py testr --slowest --testr-args='{posargs}'
whitelist_externals =
  rm
  find

[testenv:unit-postgresql]
setenv = VIRTUAL_ENV={envdir}
passenv = ZUUL_PROJECT
commands = ./run_tests.sh -V --db-type postgresql

[testenv:pep8]
commands = flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py

[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
setenv = VIRTUAL_ENV={envdir}
commands =
  python setup.py testr --coverage \
    --testr-args='^(?!.*test.*coverage).*$'
  coverage report

[testenv:genconfig]
commands =
    oslo-config-generator --config-file tools/config/config-generator.mistral.conf \
    --output-file etc/mistral.conf.sample

#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:venv]
setenv = PYTHONHASHSEED=0
commands = {posargs}

#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:docs]
setenv = PYTHONHASHSEED=0
commands = python setup.py build_sphinx

[testenv:pylint]
setenv = VIRTUAL_ENV={envdir}
commands = bash tools/lintstack.sh

[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

#Skip PEP257 violation.
[flake8]
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts

[hacking]
local-check-factory = mistral.hacking.checks.factory

{'fraction_non_alphanumeric': 0.12133302041774231, 'fraction_numerical': 0.029101149964796996, 'mean_word_length': 5.258443465491924, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4339713', 'n_tokens_mistral': 1737, 'n_tokens_neox': 1623, 'n_words': 307}