<commit_before>[tox]
envlist = py35,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 =
  rm -f .testrepository/times.dbm
  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 -N --db-type postgresql

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

[testenv:pep8]
basepython = python2.7
commands =
  flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py
  check-uuid --package mistral_tempest_tests

[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
setenv = VIRTUAL_ENV={envdir}
commands =
  {toxinidir}/tools/cover.sh {posargs}

[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]
basepython = python2.7
setenv = PYTHONHASHSEED=0
commands = {posargs}

#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:docs]
basepython = python2.7
setenv = PYTHONHASHSEED=0
commands =
  doc8 doc/source
  python setup.py build_sphinx

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

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
commands =
  rm -rf api-ref/build
  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm

#Skip PEP257 violation.
[flake8]
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401
show-source = true
builtins = _
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H203,H904
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts

[doc8]
extensions = .rst, .yaml
# Maximal line length should be 80.
max-line-length = 80

[hacking]
local-check-factory = mistral.hacking.checks.factory
import_exceptions = mistral._i18n
<commit_msg>Remove build files before run tox doc builder<commit_after>[tox]
envlist = py35,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 =
  rm -f .testrepository/times.dbm
  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 -N --db-type postgresql

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

[testenv:pep8]
basepython = python2.7
commands =
  flake8 {posargs} . {toxinidir}/tools/get_action_list.py {toxinidir}/tools/sync_db.py
  check-uuid --package mistral_tempest_tests

[testenv:cover]
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
setenv = VIRTUAL_ENV={envdir}
commands =
  {toxinidir}/tools/cover.sh {posargs}

[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]
basepython = python2.7
setenv = PYTHONHASHSEED=0
commands = {posargs}

#set PYTHONHASHSEED=0 to prevent wsmeext.sphinxext from randomly failing.
[testenv:docs]
basepython = python2.7
setenv = PYTHONHASHSEED=0
commands =
  doc8 doc/source
  rm -rf doc/build
  python setup.py build_sphinx

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

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
commands =
  rm -rf api-ref/build
  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm

#Skip PEP257 violation.
[flake8]
ignore = D100,D101,D102,D103,D104,D105,D200,D203,D202,D204,D205,D208,D400,D401
show-source = true
builtins = _
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H904] Delay string interpolations at logging calls.
enable-extensions = H106,H203,H904
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,scripts

[doc8]
extensions = .rst, .yaml
# Maximal line length should be 80.
max-line-length = 80

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

{'fraction_non_alphanumeric': 0.11124463519313305, 'fraction_numerical': 0.031587982832618024, 'mean_word_length': 4.81437125748503, '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': '6968396', 'n_tokens_mistral': 2330, 'n_tokens_neox': 2175, 'n_words': 481}