-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtox.ini
67 lines (60 loc) · 1.24 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
# SPDX-License-Identifier: Apache-2.0
[tox]
# py3-unit runs unit tests with 'python3'
# py311-unit runs the same tests with 'python3.11'
envlist = ruff, pylint, mypy, py3-unit
minversion = 4.4
labels =
lint = ruff, pylint, mypy
[testenv]
description = Run tests with pytest
package = wheel
wheel_build_env = pkg
setenv =
REPLICATE_API_TOKEN=testing
deps =
pytest
assertpy
commands =
unit: {envpython} -m pytest {posargs:tests}
[testenv:pylint]
description = Lint with pylint
deps =
pylint
{[testenv]deps}
commands =
{envpython} -m pylint {posargs:src tests}
[testenv:ruff]
description = Reformat and fix code with Ruff
skip_install = True
skipsdist = true
deps =
ruff
{[testenv]deps}
commands =
ruff check --fix
ruff format
[testenv:ruffcheck]
description = Check code with Ruff
skip_install = True
skipsdist = true
deps =
{[testenv:ruff]deps}
commands =
ruff check --diff
ruff format --check
[testenv:mypy]
description = Python type checking with mypy
namespace_packages = True
explicit_package_bases = True
deps =
mypy
{[testenv]deps}
types-assertpy
commands =
{envpython} -m mypy {posargs:src tests}
[gh]
python =
3.12 = py312-unit
3.11 = py311-unit
3.10 = py310-unit