forked from Diaoul/subliminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
101 lines (78 loc) · 2.46 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
91
92
93
94
95
96
97
98
99
100
101
[tox]
min_version = 4
env_list =
pre-commit,
mypy,
py3{9,13}-tests,
coverage,
docs,
changelog,
[testenv:.pkg]
pass_env = SETUPTOOLS_SCM_PRETEND_VERSION
[testenv]
package = wheel
wheel_build_env = .pkg
extras = test
pass_env =
COVERAGE_FILE
allowlist_externals =
echo
false
# This and the next few testenvs are a workaround for
# https://github.com/tox-dev/tox/issues/2858.
commands =
echo "Unrecognized environment name {envname}"
false
[testenv:tests]
commands = pytest {posargs:-n auto}
[testenv:py3{,.}{9,10,11,12,13}-tests]
commands = {[testenv:tests]commands}
[testenv:mypy]
commands = mypy --install-types --non-interactive {posargs:subliminal tests}
[testenv:coverage]
usedevelop = true
deps = coverage[toml]>=7
set_env =
COVERAGE_PROCESS_START = pyproject.toml
commands =
python -m pytest --cov=subliminal --cov-report= --cov-fail-under=0 {posargs:-n auto}
coverage report --skip-covered --show-missing --fail-under=80
[testenv:py3{,.}{9,10,11,12,13}-coverage]
commands = {[testenv:coverage]commands}
[testenv:coverage-core]
usedevelop = true
deps = coverage[toml]>=7
set_env =
COVERAGE_PROCESS_START = pyproject.toml
commands =
python -m pytest \
-m core --cov=subliminal --cov-report= --cov-fail-under=0 \
{posargs:-n auto}
coverage report \
--omit='subliminal/cli.py,subliminal/converters/*,subliminal/providers/*,subliminal/refiners/*' \
--skip-covered --show-missing --fail-under=100
[testenv:py3{,.}{9,10,11,12,13}-coverage-core]
commands = {[testenv:coverage-core]commands}
[testenv:pre-commit]
description =
run pre-commit-defined linters under `{basepython}`
skip_install = true
basepython = python3
deps = pre-commit>=2.9.3
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
setenv =
# pre-commit and tools it launches are not clean of this warning.
PYTHONWARNDEFAULTENCODING=
[testenv:docs]
# Keep base_python in-sync with check.yaml/docs and .readthedocs.yaml.
base_python = py312
extras = docs
allowlist_externals = sphinx-build
commands =
sphinx-build -n -T -W --keep-going -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -n -T -W --keep-going -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/html
; sphinx-build -n -T -W --keep-going -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
[testenv:changelog]
extras = docs
allowlist_externals = towncrier
commands = towncrier build --version main --draft