<commit_before>[tox]
minversion = 2.0
envlist = py27,py35,pep8,pylint
skipsdist = True

[testenv]
usedevelop = True
deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt

passenv =
    http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}

whitelist_externals =
    find
    coverage
    rm

python_files = test_*.py
norecursedirs  = .tox .venv specs

[testenv:py27]
basepython = python2.7
setenv = OS_PATH_TEST = ./freezer_api/tests/unit
commands =
    find . -type f -name "*.py[c|o]" -delete
    rm -rf .testrepository
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args="{posargs}"
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:py35]
basepython = python3.5
setenv = OS_PATH_TEST = ./freezer_api/tests/unit
commands =
    find . -type f -name "*.py[c|o]" -delete
    rm -rf .testrepository
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args="{posargs}"
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:py36]
basepython = python3.6
setenv = OS_PATH_TEST = ./freezer_api/tests/unit
commands =
    find . -type f -name "*.py[c|o]" -delete
    rm -rf .testrepository
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args="{posargs}"
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:venv]
basepython = python3
commands = {posargs}

[testenv:cover]
basepython = python3
commands =
    find . -type f -name "*.py[c|o]" -delete
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args="{posargs}"
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:pylint]
basepython = python3
commands = pylint --rcfile .pylintrc freezer_api

[testenv:pep8]
basepython = python3
commands = flake8 freezer_api

[flake8]
# Ignored hackings:
# H202 -> assertRaises(Exception, ...) too broad
# H401 -> Docstrings should not start with a space
# H404 -> Multi line docstrings should start without a leading new line.
# H405 -> Multi line docstrings should start with a one line summary followed by an empty line.
ignore = H202,H401,H404,H405
show-source = True
exclude = .venv,.tox,dist,doc,*egg,specs,build

[testenv:docs]
basepython = python3
commands =
  rm -rf api-ref/build
  python setup.py build_sphinx
  sphinx-build -W -b html api-ref/source api-ref/build/html

[testenv:api-ref]
basepython = python3
whitelist_externals = rm
commands =
  rm -rf api-ref/build
  sphinx-build -W -a -E -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

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

[testenv:genpolicy]
basepython = python3
commands = oslopolicy-sample-generator --config-file etc/freezer/freezer-policy-generator.conf

[testenv:lower-constraints]
basepython = python3
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt
<commit_msg>Don't quote {posargs} in tox.ini<commit_after>[tox]
minversion = 2.0
envlist = py27,py35,pep8,pylint
skipsdist = True

[testenv]
usedevelop = True
deps =
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt

passenv =
    http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv = VIRTUAL_ENV={envdir}

whitelist_externals =
    find
    coverage
    rm

python_files = test_*.py
norecursedirs  = .tox .venv specs

[testenv:py27]
basepython = python2.7
setenv = OS_PATH_TEST = ./freezer_api/tests/unit
commands =
    find . -type f -name "*.py[c|o]" -delete
    rm -rf .testrepository
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args={posargs}
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:py35]
basepython = python3.5
setenv = OS_PATH_TEST = ./freezer_api/tests/unit
commands =
    find . -type f -name "*.py[c|o]" -delete
    rm -rf .testrepository
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args={posargs}
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:py36]
basepython = python3.6
setenv = OS_PATH_TEST = ./freezer_api/tests/unit
commands =
    find . -type f -name "*.py[c|o]" -delete
    rm -rf .testrepository
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args={posargs}
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:venv]
basepython = python3
commands = {posargs}

[testenv:cover]
basepython = python3
commands =
    find . -type f -name "*.py[c|o]" -delete
    python setup.py test --coverage --coverage-package-name freezer_api --testr-args={posargs}
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

[testenv:pylint]
basepython = python3
commands = pylint --rcfile .pylintrc freezer_api

[testenv:pep8]
basepython = python3
commands = flake8 freezer_api

[flake8]
# Ignored hackings:
# H202 -> assertRaises(Exception, ...) too broad
# H401 -> Docstrings should not start with a space
# H404 -> Multi line docstrings should start without a leading new line.
# H405 -> Multi line docstrings should start with a one line summary followed by an empty line.
ignore = H202,H401,H404,H405
show-source = True
exclude = .venv,.tox,dist,doc,*egg,specs,build

[testenv:docs]
basepython = python3
commands =
  rm -rf api-ref/build
  python setup.py build_sphinx
  sphinx-build -W -b html api-ref/source api-ref/build/html

[testenv:api-ref]
basepython = python3
whitelist_externals = rm
commands =
  rm -rf api-ref/build
  sphinx-build -W -a -E -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

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

[testenv:genpolicy]
basepython = python3
commands = oslopolicy-sample-generator --config-file etc/freezer/freezer-policy-generator.conf

[testenv:lower-constraints]
basepython = python3
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt

{'fraction_non_alphanumeric': 0.11675511751326763, 'fraction_numerical': 0.016679302501895376, 'mean_word_length': 3.678014184397163, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4237707', 'n_tokens_mistral': 2459, 'n_tokens_neox': 2368, 'n_words': 584}