69a74590e7
This PS updates python modules and code to match Airflow 2.6.2: - bionic py36 gates were removed - python code corrected to match new modules versions - selection of python modules versions was perfoemed based on airflow-2.6.2 constraints Change-Id: I9c3e139b3437414a61af7e7c0b7d7e533fadefda
116 lines
2.8 KiB
INI
116 lines
2.8 KiB
INI
[tox]
|
|
envlist = pep8,py38,docs
|
|
|
|
[testenv]
|
|
basepython=python3
|
|
deps=
|
|
-r{toxinidir}/requirements-frozen.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
passenv=
|
|
HTTP_PROXY
|
|
HTTPS_PROXY
|
|
http_proxy
|
|
https_proxy
|
|
NO_PROXY
|
|
no_proxy
|
|
install_command = pip install {opts} {packages}
|
|
allowlist_externals =
|
|
bash
|
|
find
|
|
rm
|
|
commands =
|
|
find . -type f -name "*.pyc" -delete
|
|
rm -Rf .testrepository/times.dbm
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:py38]
|
|
allowlist_externals =
|
|
pytest
|
|
basepython=python3.8
|
|
commands =
|
|
pytest {posargs}
|
|
|
|
[testenv:cover]
|
|
allowlist_externals =
|
|
find
|
|
stestr
|
|
coverage
|
|
setenv =
|
|
PYTHON=coverage run --source promenade --parallel-mode
|
|
commands =
|
|
py.test \
|
|
--cov=promenade \
|
|
--cov-report html:cover \
|
|
--cov-report xml:cover/coverage.xml \
|
|
--cov-report term \
|
|
tests/
|
|
|
|
[testenv:bandit]
|
|
commands =
|
|
bandit --skip B324 -r promenade
|
|
|
|
[testenv:docs]
|
|
pass_env = {[pkgenv]pass_env}
|
|
allowlist_externals =
|
|
rm
|
|
deps =
|
|
-r{toxinidir}/doc/requirements.txt
|
|
-r{toxinidir}/requirements-frozen.txt
|
|
commands =
|
|
rm -rf doc/build
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
[testenv:fmt]
|
|
allowlist_externals =
|
|
yapf
|
|
commands =
|
|
yapf -ir {toxinidir}/promenade {toxinidir}/tests {toxinidir}/tools/image_tags.py
|
|
|
|
[testenv:freeze]
|
|
recreate = True
|
|
allowlist_externals=
|
|
rm
|
|
sh
|
|
deps=
|
|
-r{toxinidir}/requirements-direct.txt
|
|
-c https://raw.githubusercontent.com/apache/airflow/constraints-2.6.2/constraints-3.8.txt
|
|
commands=
|
|
rm -f requirements-frozen.txt
|
|
sh -c "pip freeze --all | grep -vE 'promenade|pyinotify|pkg-resources' > requirements-frozen.txt"
|
|
|
|
[testenv:gate-lint]
|
|
deps =
|
|
-r{toxinidir}/requirements-frozen.txt
|
|
allowlist_externals = sh
|
|
commands =
|
|
sh -c "{toxinidir}/tools/lint_gate.sh"
|
|
|
|
|
|
[testenv:pep8]
|
|
allowlist_externals =
|
|
yapf
|
|
bandit
|
|
flake8
|
|
find
|
|
commands =
|
|
find . -not -path "*/\.*" -not -path "*/doc/build/*" -not -name "*.tgz" -type f -exec egrep -l " +$" {:} \;
|
|
yapf -rd {toxinidir}/promenade {toxinidir}/tests {toxinidir}/tools/image_tags.py
|
|
flake8 {toxinidir}/promenade
|
|
bandit --skip B324 -r promenade
|
|
|
|
[flake8]
|
|
# [H106] Don't put vim configuration in source files.
|
|
# [H203] Use assertIs(Not)None to check for None.
|
|
# [H204] Use assert(Not)Equal to check for equality.
|
|
# [H205] Use assert(Greater|Less)(Equal) for comparison.
|
|
# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
|
|
# [H904] Delay string interpolations at logging calls.
|
|
enable-extensions = H106,H203,H204,H205,H210
|
|
# [E731] Do not assign a lambda expression, use a def. This reduces readability in some cases.
|
|
ignore = E126,E731,F405,H102,H301,H306,H401,H404,H405,H904,W503,W504
|
|
exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,releasenotes,doc,alembic/versions
|