-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtox.ini
57 lines (49 loc) · 1.07 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
[tox]
requires =
tox>=4
env_list = lint, py{39,310,311,312}
[gh]
python =
3.12 = py312, lint, cov
3.11 = py311
3.10 = py310
3.9 = py39
[pytest]
minversion = 7.0
testpaths = tests
[testenv]
description = install pytest in a virtual environment and invoke it on the tests folder
deps =
pytest>=7
commands = pytest {posargs}
[testenv:cov]
deps =
pytest-cov
commands = pytest --cov --cov-report=term-missing --cov-fail-under=90 {posargs}
[testenv:lint]
deps =
flake8
black
skip_install = true
commands =
flake8 .
black . --check --diff -t py312
[flake8]
# E722 do not use bare 'except'
# E203 compatibility with black
extend-ignore = E203,E722
max-line-length = 120
exclude = .git,venv*,.tox,.eggs,build
[testenv:black]
description = run linters
skip_install = true
deps =
black
commands = black {posargs:.}
[testenv:pip-compile]
description = generate requirements.txt from dependencies specified in pyproject.toml
basepython = python312
skip_install = true
deps = pip-tools
commands =
pip-compile --generate-hashes --strip-extras {posargs}