-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
72 lines (60 loc) · 1.44 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[tox]
skipsdist = true
envlist = py311
toxworkdir=/tmp/kubekarma/
isolated_build = True
requires = hatch
setuptools >= 30.0.0
[isort]
profile = black
[flake8]
# Disable some pydocstyle checks:
# I100, I101 and I201: import order, we use pylint for it
ignore = D104, D100, D102, D101, D106, D107, W503, W504, I100, I101, I201
exclude = */pb2/*
max-line-length = 100
min_python_version = 3.11
[testenv]
basepython = python3.11
deps =
.[worker,controller,testing]
passenv =
HOME
PIP_CACHE_DIR
TERM
setenv =
PYTHONDONTWRITEBYTECODE=1
changedir = {toxinidir}
install_command=
; pip install .[all];
pip install --cache-dir={env:PIP_CACHE_DIR:/tmp/kubekarma/.cache} {packages}
commands =
python -m unittest discover kubekarma
[testenv:test-controller]
deps =
.[controller]
commands =
python -m unittest discover kubekarma/tests/controlleroperator
[testenv:test-worker]
deps =
.[worker]
commands =
python -m unittest discover kubekarma/tests/worker
[testenv:flake8]
deps =
.[testing]
commands =
flake8 {toxinidir}/kubekarma --format='%(path)s:%(row)d,%(col)d %(code)s:%(text)s:https://lintlyci.github.io/Flake8Rules/rules/%(code)s.html' --count
[testenv:lint-imports]
deps =
.[testing]
commands =
lint-imports
[testenv:type]
description = type check ourselves
passenv =
TERM
MYPY_FORCE_COLOR
MYPY_FORCE_TERMINAL_WIDTH
commands =
mypy --config-file .mypy.ini kubekarma/**/*.py