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

[testenv]
setenv = VIRTUAL_ENV={envdir}
         OS_TEST_PATH=heat/tests
         TESTR_START_DIR=heat/tests
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.pyc' -delete
  python setup.py testr --slowest --testr-args='{posargs}'

whitelist_externals =
  bash
  find
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:py27log]
commands =
  find . -type f -name "*.pyc" -delete
  bash tools/pretty_tox.sh '^(?!heat_integrationtests){posargs}'

[testenv:pep8]
commands =
    flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
    python tools/custom_guidelines.py --exclude heat/engine/resources/aws

[testenv:venv]
# Note: infra doesn't support to use of constraints for this target.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = {posargs}

[testenv:cover]
# Note: infra doesn't support to use of constraints for this target.
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
  python setup.py testr --coverage --testr-args='^(?!heat_integrationtests){posargs}'

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

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
#
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
#
# we do not used -W here because we are doing some slightly tricky
# things to build a single page document, and as such, we are ok
# ignoring the duplicate stanzas warning.
whitelist_externals = bash
                      rm
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
  rm -rf api-ref/build
  sphinx-build -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

[testenv:genconfig]
commands =
    oslo-config-generator --config-file=config-generator.conf

[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -c bandit.yaml -r heat -n5 -p heat_conservative

[flake8]
show-source = true
exclude=.*,dist,*openstack/common*,*lib/python*,*egg,build,*convergence/scenarios/*
max-complexity=20

[hacking]
import_exceptions = heat.common.i18n
local-check-factory = heat.hacking.checks.factory

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:releasenotes]
# Note: infra doesn't support to use of constraints for this target.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:install-guide]
# NOTE(jaegerandi): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html<commit_msg>Don't include openstack/common in flake8 exclude list<commit_after>[tox]
envlist = py35,py34,py27,pep8
minversion = 1.6
skipsdist = True

[testenv]
setenv = VIRTUAL_ENV={envdir}
         OS_TEST_PATH=heat/tests
         TESTR_START_DIR=heat/tests
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.pyc' -delete
  python setup.py testr --slowest --testr-args='{posargs}'

whitelist_externals =
  bash
  find
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:py27log]
commands =
  find . -type f -name "*.pyc" -delete
  bash tools/pretty_tox.sh '^(?!heat_integrationtests){posargs}'

[testenv:pep8]
commands =
    flake8 heat bin/heat-api bin/heat-api-cfn bin/heat-api-cloudwatch bin/heat-engine bin/heat-manage contrib heat_integrationtests doc/source
    python tools/custom_guidelines.py --exclude heat/engine/resources/aws

[testenv:venv]
# Note: infra doesn't support to use of constraints for this target.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = {posargs}

[testenv:cover]
# Note: infra doesn't support to use of constraints for this target.
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
  python setup.py testr --coverage --testr-args='^(?!heat_integrationtests){posargs}'

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

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
#
# NOTE(sdague): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
#
# we do not used -W here because we are doing some slightly tricky
# things to build a single page document, and as such, we are ok
# ignoring the duplicate stanzas warning.
whitelist_externals = bash
                      rm
install_command = pip install -U --force-reinstall {opts} {packages}
commands =
  rm -rf api-ref/build
  sphinx-build -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

[testenv:genconfig]
commands =
    oslo-config-generator --config-file=config-generator.conf

[testenv:bandit]
deps = -r{toxinidir}/test-requirements.txt
commands = bandit -c bandit.yaml -r heat -n5 -p heat_conservative

[flake8]
show-source = true
exclude=.*,dist,*lib/python*,*egg,build,*convergence/scenarios/*
max-complexity=20

[hacking]
import_exceptions = heat.common.i18n
local-check-factory = heat.hacking.checks.factory

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:releasenotes]
# Note: infra doesn't support to use of constraints for this target.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:install-guide]
# NOTE(jaegerandi): this target does not use constraints because
# upstream infra does not yet support it. Once that's fixed, we can
# drop the install_command.
install_command = pip install -U --force-reinstall {opts} {packages}
commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html
{'fraction_non_alphanumeric': 0.11090832514390005, 'fraction_numerical': 0.005475221114698863, 'mean_word_length': 4.384731670445956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2900774', 'n_tokens_mistral': 2490, 'n_tokens_neox': 2345, 'n_words': 651}