<NME> tox.ini
<BEF> [tox]
envlist = py39,pep8,cover,api-ref,releasenotes,bandit,fakemodetests
minversion = 3.18.0
skipsdist = True

[testenv]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
         PYTHONWARNINGS=default::DeprecationWarning
         OS_TEST_PATH=./trove/tests/unittests
         OS_STDOUT_CAPTURE=1
         OS_STDERR_CAPTURE=1

usedevelop = True
install_command = pip install \
                  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} \
                  -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands = find ./trove -type f -name "*.pyc" -delete
           rm -f trove_test.sqlite
           stestr run --serial {posargs}
           stestr slowest
allowlist_externals = find
                      rm
                      bash

[testenv:pep8]
deps =
  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  -r{toxinidir}/test-requirements.txt
commands =
    flake8
    reno lint
    doc8 {posargs}
    doc8 -e '.yaml' releasenotes/notes/
    doc8 doc/source

[testenv:debug]
commands = oslo_debug_helper {posargs}

[testenv:cover]
setenv =
  {[testenv]setenv}
  PYTHON=coverage run --source trove
commands =


[testenv:venv]
# NOTE(amrith) The setting of the install_command in this location
# is only required because currently infra does not actually
# support constraints files for the venv job, and while
# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
# no file there. It can be removed when infra changes this.
install_command = pip install -U {opts} {packages}
commands = {posargs}

[flake8]

[testenv:venv]
commands = {posargs}

[doc8]
ignore-path = .venv,.tox,.git,dist,doc,*egg-info,tools,etc,build,*.po,*.pot,integration,releasenotes,*.txt,api-ref/source/samples

[flake8]
show-source = True
commands = openstack-doc-test --check-links {posargs}

[testenv:checkbuild]
# NOTE(pmalik) The setting of the install_command in this location
# is only required because currently infra does not actually
# support constraints files for the publishdocs job, and while
# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
# no file there. It can be removed when infra changes this.
install_command = pip install -U {opts} {packages}
commands =
  openstack-doc-test --check-niceness --check-syntax --check-deletions {posargs}
  openstack-doc-test --check-build {posargs}

[testenv:publishdocs]
# NOTE(amrith) The setting of the install_command in this location
# is only required because currently infra does not actually
# support constraints files for the publishdocs job, and while
# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
# no file there. It can be removed when infra changes this.
install_command = pip install -U {opts} {packages}
commands = openstack-doc-test --check-build --publish --force

[testenv:releasenotes]
# NOTE(amrith) The setting of the install_command in this location
# is only required because currently infra does not actually
# support constraints files for the release notes job, and while
# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
# no file there. It can be removed when infra changes this.
install_command = pip install -U {opts} {packages}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:bandit]
commands = bandit -r trove -n5 -x tests

[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
[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

[testenv:releasenotes]
deps =
    -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
    -r{toxinidir}/doc/requirements.txt
allowlist_externals = rm
commands =
  rm -rf releasenotes/build
  sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:bandit]
commands = bandit -r trove -n5 -x tests

[testenv:bandit-baseline]
envdir = {toxworkdir}/bandit
commands = bandit-baseline -r trove -n5 -x tests -ii -ll

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

[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file=tools/trove-policy-generator.conf

[testenv:pylint]
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands = python tools/trove-pylint.py {posargs:check}

[testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html

[testenv:trovestack]
changedir = {toxinidir}/integration/scripts
passenv = *
commands =
    ./trovestack {posargs}

<MSG> Constraints are ready to be used for tox.ini

Per email[1] from Andreas, we don't need to hack at install_command
any longer.

[1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh

Change-Id: Ibb642f76d92cb56e1764e0460822a57f68931263

<DFF> @@ -47,12 +47,6 @@ commands =
 
 
 [testenv:venv]
-# NOTE(amrith) The setting of the install_command in this location
-# is only required because currently infra does not actually
-# support constraints files for the venv job, and while
-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
-# no file there. It can be removed when infra changes this.
-install_command = pip install -U {opts} {packages}
 commands = {posargs}
 
 [flake8]
@@ -68,40 +62,18 @@ filename=*.py,trove-*
 commands = openstack-doc-test --check-links {posargs}
 
 [testenv:checkbuild]
-# NOTE(pmalik) The setting of the install_command in this location
-# is only required because currently infra does not actually
-# support constraints files for the publishdocs job, and while
-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
-# no file there. It can be removed when infra changes this.
-install_command = pip install -U {opts} {packages}
 commands =
   openstack-doc-test --check-niceness --check-syntax --check-deletions {posargs}
   openstack-doc-test --check-build {posargs}
 
 [testenv:publishdocs]
-# NOTE(amrith) The setting of the install_command in this location
-# is only required because currently infra does not actually
-# support constraints files for the publishdocs job, and while
-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
-# no file there. It can be removed when infra changes this.
-install_command = pip install -U {opts} {packages}
 commands = openstack-doc-test --check-build --publish --force
 
 [testenv:releasenotes]
-# NOTE(amrith) The setting of the install_command in this location
-# is only required because currently infra does not actually
-# support constraints files for the release notes job, and while
-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's
-# no file there. It can be removed when infra changes this.
-install_command = pip install -U {opts} {packages}
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
 
 [testenv:bandit]
 commands = bandit -r trove -n5 -x tests
 
 [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': "diff --git a/tox.ini b/tox.ini\nindex 01be3fec..4e41769f 100644\n--- a/tox.ini\n+++ b/tox.ini\n@@ -47,12 +47,6 @@ commands =\n \n \n [testenv:venv]\n-# NOTE(amrith) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the venv job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands = {posargs}\n \n [flake8]\n@@ -68,40 +62,18 @@ filename=*.py,trove-*\n commands = openstack-doc-test --check-links {posargs}\n \n [testenv:checkbuild]\n-# NOTE(pmalik) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the publishdocs job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands =\n   openstack-doc-test --check-niceness --check-syntax --check-deletions {posargs}\n   openstack-doc-test --check-build {posargs}\n \n [testenv:publishdocs]\n-# NOTE(amrith) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the publishdocs job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands = openstack-doc-test --check-build --publish --force\n \n [testenv:releasenotes]\n-# NOTE(amrith) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the release notes job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html\n \n [testenv:bandit]\n commands = bandit -r trove -n5 -x tests\n \n [testenv:install-guide]\n-# NOTE(jaegerandi): this target does not use constraints because\n-# upstream infra does not yet support it. Once that's fixed, we can\n-# drop the install_command.\n-install_command = pip install -U --force-reinstall {opts} {packages}\n commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html\n", 'commit_subject': 'Constraints are ready to be used for tox.ini', 'repo_name': 'openstack/trove', 'committer': {'name': 'Amrith Kumar', 'email': '09718ecd8dece9cda70ce7ac6aa0a9eb6f2999fe@tesora.com', 'time_sec': '1470941214', 'tz_offset': '-240', 'date': {'seconds': '1470941214'}}, 'commit_tree': '31322912278a0c1d4845e5a19a37619bcc50a972', 'commit_message': "Constraints are ready to be used for tox.ini\n\nPer email[1] from Andreas, we don't need to hack at install_command\nany longer.\n\n[1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh\n\nChange-Id: Ibb642f76d92cb56e1764e0460822a57f68931263\n", 'language_name': 'Python', 'license': 'apache-2.0', 'hunks': "@@ -47,12 +47,6 @@ commands =\n \n \n [testenv:venv]\n-# NOTE(amrith) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the venv job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands = {posargs}\n \n [flake8]\n@@ -68,40 +62,18 @@ filename=*.py,trove-*\n commands = openstack-doc-test --check-links {posargs}\n \n [testenv:checkbuild]\n-# NOTE(pmalik) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the publishdocs job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands =\n   openstack-doc-test --check-niceness --check-syntax --check-deletions {posargs}\n   openstack-doc-test --check-build {posargs}\n \n [testenv:publishdocs]\n-# NOTE(amrith) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the publishdocs job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands = openstack-doc-test --check-build --publish --force\n \n [testenv:releasenotes]\n-# NOTE(amrith) The setting of the install_command in this location\n-# is only required because currently infra does not actually\n-# support constraints files for the release notes job, and while\n-# the environment variable UPPER_CONSTRAINTS_FILE is set, there's\n-# no file there. It can be removed when infra changes this.\n-install_command = pip install -U {opts} {packages}\n commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html\n \n [testenv:bandit]\n commands = bandit -r trove -n5 -x tests\n \n [testenv:install-guide]\n-# NOTE(jaegerandi): this target does not use constraints because\n-# upstream infra does not yet support it. Once that's fixed, we can\n-# drop the install_command.\n-install_command = pip install -U --force-reinstall {opts} {packages}\n commands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html\n", 'addition_count': 0, 'deletion_count': 28, 'src_file': 'a/tox.ini', 'tgt_file': 'b/tox.ini', 'file_extension': '.ini', 'before_file': '[tox]\nenvlist = py39,pep8,cover,api-ref,releasenotes,bandit,fakemodetests\nminversion = 3.18.0\nskipsdist = True\n\n[testenv]\nbasepython = python3\nsetenv = VIRTUAL_ENV={envdir}\n         PYTHONWARNINGS=default::DeprecationWarning\n         OS_TEST_PATH=./trove/tests/unittests\n         OS_STDOUT_CAPTURE=1\n         OS_STDERR_CAPTURE=1\n\nusedevelop = True\ninstall_command = pip install \\\n                  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} \\\n                  -U {opts} {packages}\ndeps = -r{toxinidir}/requirements.txt\n       -r{toxinidir}/test-requirements.txt\ncommands = find ./trove -type f -name "*.pyc" -delete\n           rm -f trove_test.sqlite\n           stestr run --serial {posargs}\n           stestr slowest\nallowlist_externals = find\n                      rm\n                      bash\n\n[testenv:pep8]\ndeps =\n  -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}\n  -r{toxinidir}/test-requirements.txt\ncommands =\n    flake8\n    reno lint\n    doc8 {posargs}\n    doc8 -e \'.yaml\' releasenotes/notes/\n    doc8 doc/source\n\n[testenv:debug]\ncommands = oslo_debug_helper {posargs}\n\n[testenv:cover]\nsetenv =\n  {[testenv]setenv}\n  PYTHON=coverage run --source trove\ncommands =\n\n\n[testenv:venv]\n# NOTE(amrith) The setting of the install_command in this location\n# is only required because currently infra does not actually\n# support constraints files for the venv job, and while\n# the environment variable UPPER_CONSTRAINTS_FILE is set, there\'s\n# no file there. It can be removed when infra changes this.\ninstall_command = pip install -U {opts} {packages}\ncommands = {posargs}\n\n[flake8]\n\n[testenv:venv]\ncommands = {posargs}\n\n[doc8]\nignore-path = .venv,.tox,.git,dist,doc,*egg-info,tools,etc,build,*.po,*.pot,integration,releasenotes,*.txt,api-ref/source/samples\n\n[flake8]\nshow-source = True\ncommands = openstack-doc-test --check-links {posargs}\n\n[testenv:checkbuild]\n# NOTE(pmalik) The setting of the install_command in this location\n# is only required because currently infra does not actually\n# support constraints files for the publishdocs job, and while\n# the environment variable UPPER_CONSTRAINTS_FILE is set, there\'s\n# no file there. It can be removed when infra changes this.\ninstall_command = pip install -U {opts} {packages}\ncommands =\n  openstack-doc-test --check-niceness --check-syntax --check-deletions {posargs}\n  openstack-doc-test --check-build {posargs}\n\n[testenv:publishdocs]\n# NOTE(amrith) The setting of the install_command in this location\n# is only required because currently infra does not actually\n# support constraints files for the publishdocs job, and while\n# the environment variable UPPER_CONSTRAINTS_FILE is set, there\'s\n# no file there. It can be removed when infra changes this.\ninstall_command = pip install -U {opts} {packages}\ncommands = openstack-doc-test --check-build --publish --force\n\n[testenv:releasenotes]\n# NOTE(amrith) The setting of the install_command in this location\n# is only required because currently infra does not actually\n# support constraints files for the release notes job, and while\n# the environment variable UPPER_CONSTRAINTS_FILE is set, there\'s\n# no file there. It can be removed when infra changes this.\ninstall_command = pip install -U {opts} {packages}\ncommands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html\n\n[testenv:bandit]\ncommands = bandit -r trove -n5 -x tests\n\n[testenv:install-guide]\n# NOTE(jaegerandi): this target does not use constraints because\n# upstream infra does not yet support it. Once that\'s fixed, we can\n# drop the install_command.\ninstall_command = pip install -U --force-reinstall {opts} {packages}\ncommands = sphinx-build -a -E -W -d install-guide/build/doctrees -b html install-guide/source install-guide/build/html\n[testenv:api-ref]\n# This environment is called from CI scripts to test and publish\n# the API Ref to developer.openstack.org.\ncommands =\n  rm -rf api-ref/build\n  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html\n\n[testenv:releasenotes]\ndeps =\n    -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}\n    -r{toxinidir}/doc/requirements.txt\nallowlist_externals = rm\ncommands =\n  rm -rf releasenotes/build\n  sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html\n\n[testenv:bandit]\ncommands = bandit -r trove -n5 -x tests\n\n[testenv:bandit-baseline]\nenvdir = {toxworkdir}/bandit\ncommands = bandit-baseline -r trove -n5 -x tests -ii -ll\n\n[testenv:genconfig]\ncommands = oslo-config-generator --config-file=tools/trove-config-generator.conf\n\n[testenv:genpolicy]\ncommands = oslopolicy-sample-generator --config-file=tools/trove-policy-generator.conf\n\n[testenv:pylint]\ndeps = -r{toxinidir}/requirements.txt\n       -r{toxinidir}/test-requirements.txt\ncommands = python tools/trove-pylint.py {posargs:check}\n\n[testenv:docs]\ncommands = sphinx-build -W -b html doc/source doc/build/html\n\n[testenv:trovestack]\nchangedir = {toxinidir}/integration/scripts\npassenv = *\ncommands =\n    ./trovestack {posargs}\n', 'message': "Constraints are ready to be used for tox.ini\n\nPer email[1] from Andreas, we don't need to hack at install_command\nany longer.\n\n[1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh\n\nChange-Id: Ibb642f76d92cb56e1764e0460822a57f68931263\n", 'author_name': 'Amrith Kumar', 'lang': 'ini'}