<commit_before>[tox]
envlist = py39,py38,py36,pep8,docs
minversion = 3.1.1
skipsdist = True
ignore_basepython_conflict = True

[testenv]
basepython = python3
# TODO(yasufum) Remove following definitions after tosca-parser and
# heat-translator have its own devstack scripts.
#   * `TOX_CONSTRAINTS_FILE` in setenv
#   * `-r{toxinidir}/requirements-extra.txt` in [testenv], [testenv:docs] and
#     [testenv:lower-constraints] sections.
setenv = VIRTUAL_ENV={envdir}
         OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
         OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
         OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
         TOX_CONSTRAINTS_FILE={toxinidir}/upper-constraints.txt
passenv = TOX_CONSTRAINTS_FILE
usedevelop = True
whitelist_externals = rm
install_command =
    pip install -U {opts} {packages}
deps =
  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/requirements-extra.txt
  -r{toxinidir}/test-requirements.txt
commands =
   stestr run --slowest --concurrency 1 {posargs}

[testenv:functional]
setenv = {[testenv]setenv}
commands =
  stestr --test-path=./tacker/tests/functional run --slowest {posargs}

[testenv:dsvm-functional]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional run --slowest --concurrency 2 {posargs}

[testenv:dsvm-functional-legacy]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/legacy run --slowest --concurrency 1 {posargs}

[testenv:dsvm-functional-sol]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/sol run --slowest --concurrency 1 {posargs}

[testenv:dsvm-functional-sol-separated-nfvo]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/sol_separated_nfvo run --slowest --concurrency 1 {posargs}

[testenv:dsvm-functional-sol-kubernetes]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/sol_kubernetes run --slowest --concurrency 2 {posargs}

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:debug-py36]
basepython = python3.6
commands = oslo_debug_helper {posargs}

[testenv:debug-py39]
basepython = python3.9
commands = oslo_debug_helper {posargs}

[testenv:pep8]
deps = -r{toxinidir}/doc/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  flake8
  doc8 -e .rst doc/source/ CONTRIBUTING.rst HACKING.rst README.rst TESTING.rst
  tacker-db-manage check_migration
whitelist_externals = bash

[testenv:i18n]
commands = python ./tools/check_i18n.py ./tacker

[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
       -r{toxinidir}/requirements-extra.txt
commands =
  sphinx-build -W -b html doc/source doc/build/html
  oslopolicy-sample-generator --config-file=etc/tacker-policy-generator.conf

[testenv:api-ref]
deps = -r{toxinidir}/doc/requirements.txt
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

[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt<commit_msg>Update min version of tox<commit_after>[tox]
envlist = py39,py38,py36,pep8,docs
minversion = 3.18.0
skipsdist = True
ignore_basepython_conflict = True

[testenv]
basepython = python3
# TODO(yasufum) Remove following definitions after tosca-parser and
# heat-translator have its own devstack scripts.
#   * `TOX_CONSTRAINTS_FILE` in setenv
#   * `-r{toxinidir}/requirements-extra.txt` in [testenv], [testenv:docs] and
#     [testenv:lower-constraints] sections.
setenv = VIRTUAL_ENV={envdir}
         OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
         OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
         OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
         TOX_CONSTRAINTS_FILE={toxinidir}/upper-constraints.txt
passenv = TOX_CONSTRAINTS_FILE
usedevelop = True
allowlist_externals = rm
deps =
  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/requirements-extra.txt
  -r{toxinidir}/test-requirements.txt
commands =
   stestr run --slowest --concurrency 1 {posargs}

[testenv:functional]
setenv = {[testenv]setenv}
commands =
  stestr --test-path=./tacker/tests/functional run --slowest {posargs}

[testenv:dsvm-functional]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional run --slowest --concurrency 2 {posargs}

[testenv:dsvm-functional-legacy]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/legacy run --slowest --concurrency 1 {posargs}

[testenv:dsvm-functional-sol]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/sol run --slowest --concurrency 1 {posargs}

[testenv:dsvm-functional-sol-separated-nfvo]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/sol_separated_nfvo run --slowest --concurrency 1 {posargs}

[testenv:dsvm-functional-sol-kubernetes]
setenv = {[testenv]setenv}

commands =
  stestr --test-path=./tacker/tests/functional/sol_kubernetes run --slowest --concurrency 2 {posargs}

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:debug-py36]
basepython = python3.6
commands = oslo_debug_helper {posargs}

[testenv:debug-py39]
basepython = python3.9
commands = oslo_debug_helper {posargs}

[testenv:pep8]
deps = -r{toxinidir}/doc/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  flake8
  doc8 -e .rst doc/source/ CONTRIBUTING.rst HACKING.rst README.rst TESTING.rst
  tacker-db-manage check_migration
allowlist_externals = bash

[testenv:i18n]
commands = python ./tools/check_i18n.py ./tacker

[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
       -r{toxinidir}/requirements-extra.txt
commands =
  sphinx-build -W -b html doc/source doc/build/html
  oslopolicy-sample-generator --config-file=etc/tacker-policy-generator.conf

[testenv:api-ref]
deps = -r{toxinidir}/doc/requirements.txt
commands =
  rm -rf api-ref/build
  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
allowlist_externals = rm

[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
{'fraction_non_alphanumeric': 0.12951710905020786, 'fraction_numerical': 0.010393348257115445, 'mean_word_length': 4.640216411181244, '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': '3531167', 'n_tokens_mistral': 2505, 'n_tokens_neox': 2370, 'n_words': 399}