-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
70 lines (61 loc) · 2.22 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
[tox]
isolated_build = true
envlist = ruff-format, ruff-check, pytest-{min,latest}, mypy, pylint, bandit
[testenv:ruff-format]
description = 'Check code style with Ruff'
deps =
ruff >=0.2.1
commands = ruff format --check --force-exclude fastapi_hypermodel tests examples
[testenv:pytest-latest]
description = 'Run Python tests with pytest test runner using latest dependencies.'
deps =
httpx >=0.26.0
pytest >=8.0.1
pytest-cov >=4.1.0
pytest-lazy-fixtures >=1.0.5
coverage >=7.4.1
commands = coverage run --module pytest -k "not integration" tests/
coverage report --show-missing --skip-covered --fail-under 100 --omit "examples/*,tests/integration/*"
coverage run --module pytest -k "integration" tests/
coverage report --show-missing --skip-covered --omit "tests/*"
[testenv:pytest-min]
description = 'Run Python tests with pytest test runner using oldest possible versions'
deps =
httpx >=0.26.0
pytest >=8.0.1
pytest-cov >=4.1.0
pytest-lazy-fixtures >=1.0.5
coverage >=7.4.1
# Minimal Versions as per pyproject.toml
pydantic == 2.4.0
fastapi == 0.115.2
typing_extensions == 4.8.0
jsonref == 0.1
jsonschema == 2.0.0
frozendict == 2.0.2
starlette == 0.37.2
commands = coverage run --module pytest -k "not integration" tests/
coverage report --show-missing --skip-covered --fail-under 100 --omit "examples/*,tests/integration/*"
coverage run --module pytest -k "integration" tests/
coverage report --show-missing --skip-covered --omit "tests/*"
[testenv:mypy]
description = 'Execute static analysis with mypy (type annotations).'
deps =
mypy >=1.8.0
commands = mypy --install-types --non-interactive fastapi_hypermodel/
[testenv:ruff-check]
description = 'Execute static analysis with ruff.'
deps =
ruff >=0.2.1
commands = ruff check --no-fix --force-exclude --exit-non-zero-on-fix fastapi_hypermodel tests examples
[testenv:pylint]
description = 'Execute static analysis with pylint.'
deps =
pylint >=3.0.3
pylint_pydantic >=0.3.2
commands = pylint fastapi_hypermodel/
[testenv:bandit]
description = 'Execute static analysis with bandit.'
deps =
bandit >=1.7.7
commands = bandit -r fastapi_hypermodel/