Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 1 | [tox] |
wangzihao | 45b3d39 | 2021-05-20 14:09:51 +0800 | [diff] [blame] | 2 | minversion = 3.18.0 |
dekehn | e32fe1a | 2022-01-25 16:52:33 +0000 | [diff] [blame] | 3 | envlist = pep8 |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 4 | skipsdist = True |
Ghanshyam | 3862c0a | 2020-01-23 17:17:45 -0600 | [diff] [blame] | 5 | ignore_basepython_conflict = True |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 6 | |
| 7 | [testenv] |
Ghanshyam | 3862c0a | 2020-01-23 17:17:45 -0600 | [diff] [blame] | 8 | basepython = python3 |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 9 | usedevelop = True |
Andreas Jaeger | 7cd8d5a | 2017-12-02 07:11:16 +0100 | [diff] [blame] | 10 | install_command = pip install {opts} {packages} |
| 11 | deps = |
wangzihao | 45b3d39 | 2021-05-20 14:09:51 +0800 | [diff] [blame] | 12 | -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
Andreas Jaeger | 7cd8d5a | 2017-12-02 07:11:16 +0100 | [diff] [blame] | 13 | -r{toxinidir}/requirements.txt |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 14 | -r{toxinidir}/test-requirements.txt |
| 15 | setenv = |
Tony Breeds | de55ca2 | 2016-12-20 15:42:54 +1100 | [diff] [blame] | 16 | VIRTUAL_ENV={envdir} |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 17 | PYTHONDONTWRITEBYTECODE=1 |
Takashi Kajinami | a5ac52d | 2022-05-22 22:21:34 +0900 | [diff] [blame] | 18 | allowlist_externals = sh |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 19 | find |
| 20 | rm |
| 21 | commands = |
| 22 | find . -type f -name "*.pyc" -delete |
Vu Cong Tuan | f348bfe | 2018-07-12 14:12:34 +0700 | [diff] [blame] | 23 | stestr run {posargs} |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 24 | passenv = http_proxy |
| 25 | HTTP_PROXY |
| 26 | https_proxy |
| 27 | HTTPS_PROXY |
| 28 | no_proxy |
| 29 | NO_PROXY |
| 30 | OS_DEBUG |
| 31 | OS_LOG_CAPTURE |
| 32 | OS_STDERR_CAPTURE |
| 33 | OS_STDOUT_CAPTURE |
| 34 | |
| 35 | [testenv:pep8] |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 36 | commands = sh tools/pretty_flake8.sh |
| 37 | |
Graham Hayes | c392cf9 | 2017-02-23 16:06:04 -0500 | [diff] [blame] | 38 | [testenv:docs] |
Nicolas Bock | add7311 | 2021-01-04 10:24:01 -0700 | [diff] [blame] | 39 | deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} |
| 40 | -r{toxinidir}/doc/requirements.txt |
Graham Hayes | c392cf9 | 2017-02-23 16:06:04 -0500 | [diff] [blame] | 41 | commands = rm -rf doc/build |
| 42 | sphinx-build -E -W -b html doc/source doc/build/html |
| 43 | |
Nicolas Bock | add7311 | 2021-01-04 10:24:01 -0700 | [diff] [blame] | 44 | [testenv:releasenotes] |
| 45 | deps = {[testenv:docs]deps} |
Takashi Kajinami | a5ac52d | 2022-05-22 22:21:34 +0900 | [diff] [blame] | 46 | allowlist_externals = rm |
Nicolas Bock | add7311 | 2021-01-04 10:24:01 -0700 | [diff] [blame] | 47 | commands = |
| 48 | rm -rf releasenotes/build |
| 49 | sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html |
| 50 | |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 51 | [testenv:bashate] |
| 52 | deps = bashate |
Takashi Kajinami | a5ac52d | 2022-05-22 22:21:34 +0900 | [diff] [blame] | 53 | allowlist_externals = bash |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 54 | commands = bash -c "find {toxinidir}/devstack \ |
| 55 | -not \( -type d -name .?\* -prune \) \ |
| 56 | -not \( -type d -name doc -prune \) \ |
| 57 | -type f \ |
| 58 | -not -name \*~ \ |
| 59 | -not -name \*.md \ |
| 60 | \( \ |
| 61 | -name \*.sh -or \ |
| 62 | -name \*rc -or \ |
| 63 | -name functions\* -or \ |
| 64 | -wholename \*/lib/\* \ |
| 65 | \) \ |
| 66 | -print0 | xargs -0 bashate -v" |
| 67 | |
| 68 | [testenv:pip-check-reqs] |
| 69 | # do not install test-requirements as that will pollute the virtualenv for |
| 70 | # determining missing packages |
| 71 | # this also means that pip-missing-reqs must be installed separately, outside |
| 72 | # of the requirements.txt files |
| 73 | deps = pip-check-reqs |
| 74 | -r{toxinidir}/requirements.txt |
| 75 | commands=pip-missing-reqs -d --ignore-file=designate/tests/* designate |
| 76 | |
| 77 | [testenv:venv] |
| 78 | commands = {posargs} |
| 79 | |
| 80 | [flake8] |
| 81 | # ignored flake8 codes: |
| 82 | # H302 import only modules |
| 83 | # H306 imports not in alphabetical order |
| 84 | # H402 one line docstring needs punctuation |
| 85 | # H404 multi line docstring should start with a summary |
| 86 | # H405 multi line docstring summary not separated with an empty line |
| 87 | # H904 Wrap long lines in parentheses instead of a backslash |
| 88 | # E126 continuation line over-indented for hanging indent |
| 89 | # E128 continuation line under-indented for visual indent |
Andreas Jaeger | 5fb81fa | 2020-03-29 15:37:12 +0200 | [diff] [blame] | 90 | # W504 line break after binary operator |
| 91 | ignore = H302,H306,H402,H404,H405,H904,E126,E128,W504 |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 92 | exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools,.ropeproject |
Kiall Mac Innes | a17f233 | 2016-08-25 13:34:42 +0100 | [diff] [blame] | 93 | |
Andreas Jaeger | 5fb81fa | 2020-03-29 15:37:12 +0200 | [diff] [blame] | 94 | [flake8:local-plugins] |
| 95 | extension = |
| 96 | T102 = tempest.hacking.checks:import_no_clients_in_api_and_scenario_tests |
| 97 | T104 = tempest.hacking.checks:scenario_tests_need_service_tags |
| 98 | T105 = tempest.hacking.checks:no_setup_teardown_class_for_tests |
| 99 | T107 = tempest.hacking.checks:service_tags_not_in_module_path |
| 100 | T108 = tempest.hacking.checks:no_hyphen_at_end_of_rand_name |
| 101 | N322 = tempest.hacking.checks:no_mutable_default_args |
| 102 | T109 = tempest.hacking.checks:no_testtools_skip_decorator |
Michael Johnson | 4d257b3 | 2024-11-08 20:28:36 +0000 | [diff] [blame^] | 103 | # TODO(johnsom) Re-enable these once tempest updates hacking to > 3.1.0 |
| 104 | # T110 = tempest.hacking.checks:get_resources_on_service_clients |
| 105 | # T111 = tempest.hacking.checks:delete_resources_on_service_clients |
Andreas Jaeger | 5fb81fa | 2020-03-29 15:37:12 +0200 | [diff] [blame] | 106 | T112 = tempest.hacking.checks:dont_import_local_tempest_into_lib |
| 107 | T113 = tempest.hacking.checks:dont_use_config_in_tempest_lib |
| 108 | T114 = tempest.hacking.checks:use_rand_uuid_instead_of_uuid4 |
Michael Johnson | cc8f89b | 2021-11-30 00:31:24 +0000 | [diff] [blame] | 109 | D701 = checks:mutable_default_arguments |
| 110 | D703 = checks:check_explicit_underscore_import |
| 111 | D704 = checks:no_import_graduated_oslo_libraries |
| 112 | D705 = checks:use_timeutils_utcnow |
| 113 | D706 = checks:no_translate_debug_logs |
| 114 | D707 = checks:check_no_basestring |
| 115 | D708 = checks:check_python3_xrange |
| 116 | D709 = checks:check_no_log_audit |
| 117 | D710 = checks:check_no_log_warn |
| 118 | D711 = checks:check_line_continuation_no_backslash |
| 119 | paths = ./designate_tempest_plugin/hacking |
| 120 | |