129 строки
2.5 KiB
INI
129 строки
2.5 KiB
INI
[tox]
|
|
envlist = py37-{black,mypy,flake8,bandit,pylint,unit,integration}
|
|
|
|
[testenv]
|
|
deps =
|
|
-r{toxinidir}/scripts/build/requirements/piptools.in
|
|
-r{toxinidir}/scripts/build/requirements/test.in
|
|
-rrequirements.txt
|
|
|
|
depends =
|
|
py37-{mypy,flake8,bandit,pylint,unit,integration}: py37-black
|
|
|
|
[testenv:py37-black]
|
|
skip_install = true
|
|
deps = black
|
|
commands = black \
|
|
--config "../black.toml" \
|
|
"methane" \
|
|
"tests"
|
|
|
|
[testenv:py37-mypy]
|
|
skip_install = true
|
|
deps = mypy
|
|
commands =
|
|
mypy \
|
|
--config-file "../tox.ini" \
|
|
"methane"
|
|
|
|
[testenv:py37-flake8]
|
|
skip_install = true
|
|
deps = flake8
|
|
commands =
|
|
flake8 \
|
|
--config "../tox.ini" \
|
|
"methane"
|
|
|
|
[testenv:py37-bandit]
|
|
skip_install = true
|
|
deps = bandit
|
|
commands = bandit -r --ini "../tox.ini"
|
|
|
|
[testenv:py37-pylint]
|
|
deps =
|
|
pylint
|
|
pylint-junit
|
|
commands =
|
|
pylint \
|
|
--rcfile "../.pylintrc" \
|
|
"methane"
|
|
|
|
[testenv:py37-safety]
|
|
skip_install = true
|
|
deps = safety
|
|
commands = safety check --full-report
|
|
|
|
[testenv:py37-unit]
|
|
deps =
|
|
pytest
|
|
coverage
|
|
pytest-cov
|
|
commands =
|
|
coverage erase
|
|
python3 -m pytest \
|
|
-c "../tox.ini" \
|
|
-m "not integration and not gpu" \
|
|
--cov-append \
|
|
--cov-config "../.coveragerc" \
|
|
--cov methane \
|
|
"tests"
|
|
coverage \
|
|
report \
|
|
--fail-under 80 \
|
|
--include "**/methane/*" \
|
|
--omit "**/__init__.py"
|
|
|
|
[testenv:py37-integration]
|
|
deps =
|
|
pytest
|
|
pytest-parallel
|
|
commands =
|
|
python -m pytest \
|
|
-c "../tox.ini" \
|
|
-m "integration" \
|
|
--workers "auto" \
|
|
--tests-per-worker "auto" \
|
|
"tests"
|
|
|
|
[bandit]
|
|
exclude = build,dist,tests,scripts
|
|
number: 4
|
|
recursive: True
|
|
skips = B110,B311,B314,B404,B405,B406
|
|
targets = methane
|
|
|
|
[flake8]
|
|
max-line-length = 120
|
|
select = F,E,W,B,B901,B902,B903
|
|
exclude =
|
|
.eggs,
|
|
.git,
|
|
.tox,
|
|
nssm,
|
|
obj,
|
|
out,
|
|
packages,
|
|
pywin32,
|
|
tests,
|
|
swagger_client
|
|
ignore = E722,B001,W503,E203
|
|
|
|
[pytest]
|
|
junit_family = xunit2
|
|
markers =
|
|
integration: marks as integration test
|
|
notebooks: marks as notebook test
|
|
gpu: marks as gpu test
|
|
smoke: marks as smoke test
|
|
spark: marks tests which need Spark
|
|
cdm: marks tests which need cdm
|
|
slow: marks tests as slow
|
|
unit: fast offline tests
|
|
nightly: tests run nightly, but not on PRs
|
|
|
|
[mypy]
|
|
python_version = 3.7
|
|
ignore_missing_imports = True
|
|
strict_optional = False
|
|
follow_imports = silent
|
|
no_site_packages = True |