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 91 92 93 94 95 96 97 98 99 100 101
|
[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_combine
cov_report
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
dependency_groups = 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}
depends = cov_clean
[testenv:cov_clean]
description = "erase coverage data to prepare for a new run"
deps = coverage
skip_install = true
commands = coverage erase
depends =
[testenv:cov_combine]
description = "combine coverage data"
deps = coverage
skip_install = true
commands = coverage combine
depends = py{,38,39,310,311,312,313}{,-mindeps,-format,-json5,-pyjson5,-disable_orjson}
[testenv:cov_report]
description = "report test coverage"
deps = coverage
skip_install = true
commands = coverage report --skip-covered
depends = cov_combine
[testenv:mypy]
description = "check type annotations with mypy"
deps = mypy
types-jsonschema
types-requests
click
commands = mypy src/ {posargs}
depends =
[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
dependency_groups = 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
|