-
Notifications
You must be signed in to change notification settings - Fork 40
/
tox.ini
90 lines (80 loc) · 2.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[tox]
envlist =
mypy
cov_clean
py39-mindeps{,-format}
py{313,312,311,310,39}
py{39,313}-{json5,pyjson5}{,-format}
py{39,313}-{disable_orjson}
cov
skip_missing_interpreters = true
minversion = 4.0.0
labels =
ci = py, py-notoml, py-tomli-format, py-json5, py-pyjson5
[testenv]
description = "run tests with pytest"
usedevelop = true
extras = dev
deps =
# attrs v23.2.0 is needed for mindeps because jsonschema==4.18.0
# is uses `hash=True` which was deprecated after this version
mindeps: attrs==23.2.0
mindeps: jsonschema==4.18.0
mindeps: click==8.0.0
mindeps: requests==2.0.0
!disable_orjson: orjson
json5: json5
pyjson5: pyjson5
format: jsonschema[format]
commands =
coverage run -m pytest {posargs:--junitxml={envdir}/pytest.xml}
[testenv:cov_clean]
description = "erase coverage data to prepare for a new run"
deps = coverage
skip_install = true
commands = coverage erase
[testenv:cov]
description = "combine and report coverage data"
deps = coverage
skip_install = true
commands_pre = - coverage combine
commands = coverage report --skip-covered
[testenv:mypy]
description = "check type annotations with mypy"
deps = mypy
types-jsonschema
types-requests
click
commands = mypy src/ {posargs}
[testenv:pyright]
description = "check type annotations with pyright"
deps = pyright
types-jsonschema
types-requests
commands = pyright src/ {posargs}
[testenv:docs]
description = "build docs with sphinx"
basepython = python3.10
extras = docs
allowlist_externals = rm
changedir = docs/
# clean the build dir before rebuilding
commands_pre = rm -rf _build/
commands = sphinx-build -d _build/doctrees -b dirhtml -W . _build/dirhtml {posargs}
[testenv:twine-check]
description = "check the metadata on a package build"
skip_install = true
deps = twine
build
allowlist_externals = rm
commands_pre = rm -rf dist/
# check that twine validating package data works
commands = python -m build
twine check dist/*
[testenv:vendor-schemas]
description = "update the vendored schemas"
deps = pre-commit
commands = python ./scripts/vendor-schemas.py
[testenv:generate-hooks-config]
description = "update autogenerated pre-commit hooks"
commands = python ./scripts/generate-hooks-config.py