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

[testenv]

# Note the hash seed is set to 0 until senlin can be tested with a
# random hash seed successfully.
setenv = VIRTUAL_ENV={envdir}
         PYTHONHASHSEED=0
         OS_TEST_PATH=senlin/tests/unit

deps = -r{toxinidir}/test-requirements.txt

usedevelop = True
install_command = pip install {opts} {packages}
commands =
    find . -type f -name "*.pyc" -delete
    ostestr --slowest {posargs}

whitelist_externals = bash
                      find

[testenv:functional]
setenv = VIRTUAL_ENV={envdir}
         PYTHONHASHSEED=0
         OS_TEST_PATH=senlin/tests/functional
passenv = OS_USERNAME OS_PASSWORD OS_TENANT_NAME OS_USER_DOMAIN_NAME OS_PROJECT_DOMAIN_NAME OS_REGION_NAME OS_AUTH_URL
commands =
    find . -type f -name "*.pyc" -delete
    ostestr --slowest --concurrency 1 {posargs}

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper {posargs}

[testenv:debug-py34]
basepython = python3.4
commands = oslo_debug_helper {posargs}

[testenv:pep8]
commands =
    flake8 senlin
    # Check that .po and .pot files are valid:
    bash -c "find senlin -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"

[testenv:genconfig]
envdir = {toxworkdir}/venv
commands =
  {toxinidir}/tools/gen-config

[testenv:venv]
commands = {posargs}

[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands = python setup.py test --coverage --testr-args="^(?!senlin\.tests\.functional){posargs}"

[testenv:docs]
deps = -r{toxinidir}/test-requirements.txt
       sphinxcontrib-httpdomain
commands = python setup.py build_sphinx

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


[flake8]
ignore = E402
show-source = true
exclude=.venv,.git,.tox,cover,dist,*lib/python*,*egg,tools,build,releasenotes
max-complexity=20

[hacking]
local-check-factory = senlin.hacking.checks.factory
import_exceptions = senlin.common.i18n<commit_msg>Re-enable E402 check<commit_after>[tox]
minversion = 1.6
envlist = py34,py27,pep8,functional
skipsdist = True

[testenv]

# Note the hash seed is set to 0 until senlin can be tested with a
# random hash seed successfully.
setenv = VIRTUAL_ENV={envdir}
         PYTHONHASHSEED=0
         OS_TEST_PATH=senlin/tests/unit

deps = -r{toxinidir}/test-requirements.txt

usedevelop = True
install_command = pip install {opts} {packages}
commands =
    find . -type f -name "*.pyc" -delete
    ostestr --slowest {posargs}

whitelist_externals = bash
                      find

[testenv:functional]
setenv = VIRTUAL_ENV={envdir}
         PYTHONHASHSEED=0
         OS_TEST_PATH=senlin/tests/functional
passenv = <PASSWORD>USERNAME OS_PASSWORD OS_TENANT_NAME OS_USER_DOMAIN_NAME OS_PROJECT_DOMAIN_NAME OS_REGION_NAME OS_AUTH_URL
commands =
    find . -type f -name "*.pyc" -delete
    ostestr --slowest --concurrency 1 {posargs}

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper {posargs}

[testenv:debug-py34]
basepython = python3.4
commands = oslo_debug_helper {posargs}

[testenv:pep8]
commands =
    flake8 senlin
    # Check that .po and .pot files are valid:
    bash -c "find senlin -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"

[testenv:genconfig]
envdir = {toxworkdir}/venv
commands =
  {toxinidir}/tools/gen-config

[testenv:venv]
commands = {posargs}

[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands = python setup.py test --coverage --testr-args="^(?!senlin\.tests\.functional){posargs}"

[testenv:docs]
deps = -r{toxinidir}/test-requirements.txt
       sphinxcontrib-httpdomain
commands = python setup.py build_sphinx

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


[flake8]
ignore =
show-source = true
exclude=.venv,.git,.tox,cover,dist,*lib/python*,*egg,tools,build,releasenotes
max-complexity=20

[hacking]
local-check-factory = senlin.hacking.checks.factory
import_exceptions = senlin.common.i18n
{'fraction_non_alphanumeric': 0.1154663518299882, 'fraction_numerical': 0.015112160566706022, 'mean_word_length': 4.159561510353228, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, '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': '2686550', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1549, 'n_words': 342}