-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
56 lines (52 loc) · 1.25 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
[tox]
envlist =
fix
py311
py37
type
pkg_meta
isolated_build = true
skip_missing_interpreters = true
minversion = 3.22
[testenv]
description = run the tests with pytest under {envname}
passenv =
OPENAI_APIKEY
extras =
testing
commands =
coverage run -m pytest tests -vv
package = wheel
wheel_build_env = .pkg
[testenv:fix]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
passenv =
{[testenv]passenv}
PROGRAMDATA
skip_install = true
deps =
pre-commit>=2.21
allowlist_externals=bash
commands =
bash -c 'pre-commit run --show-diff-on-failure -a'
python -c 'print(r"hint: run {envbindir}{/}pre-commit install to add checks as pre-commit hook")'
[testenv:type]
description = run type check on code base
deps =
mypy==0.991
types-cachetools>=5.2.1
types-chardet>=5.0.4.1
types-requests>=2.28.2
commands =
mypy --ignore-missing-imports tests
[testenv:pkg_meta]
description = check that the long description is valid
skip_install = true
deps =
build[virtualenv]>=0.9
check-wheel-contents>=0.4
twine>=4.0.2
commands =
python -m build -o {envtmpdir} -s -w .
twine check {envtmpdir}{/}*
check-wheel-contents --no-config {envtmpdir}