-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
87 lines (76 loc) · 1.92 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
[tox]
isolated_build = true
envlist = py{38,39,310,311,312},style,docs,minimal,typecheck,isort,slotscheck
[testenv]
allowlist_externals =
poetry
setenv=
POETRY_VIRTUALENVS_CREATE=false
commands_pre=
poetry install -n -v --no-root --only test -E fonts -E hyphens
extras=
fonts
hyphens
commands=
pytest
[testenv:py312]
commands =
pytest -v --cov=pdfje {posargs}
[testenv:minimal]
commands_pre=
poetry install -n -v --no-root --only test
commands=
pytest {posargs}
extras=
[testenv:typecheck]
commands_pre=
poetry install -n -v --no-root --only typecheck --only test -E fonts -E hyphens
commands=
mypy --pretty --strict src/ examples/
mypy --pretty tests/
[testenv:style]
commands_pre=
poetry install -n -v --no-root --only linting -E fonts -E hyphens
commands=
black --check --diff src/ tests/
flake8 src/ tests/
[testenv:isort]
commands_pre=
poetry install -n -v --no-root --only linting -E fonts -E hyphens
commands=
isort --check-only --diff src/ tests/
[testenv:slotscheck]
commands_pre=
poetry install -n -v --no-root --only linting -E fonts -E hyphens
commands=
slotscheck -m pdfje
[testenv:docs]
basepython=python3.11
deps=
-rdocs/requirements.txt
commands=
sphinx-build -W -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out" \
--color -bhtml
python -c 'import pathlib; print("documentation available under " \
+ (pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html").as_uri())'
[coverage:run]
branch=True
[coverage:report]
fail_under=99
exclude_lines=
pragma: no cover
raise NotImplementedError
def __repr__
@overload
^\s+def.*: \.\.\.
if TYPE_CHECKING:
omit=*/pdfje/vendor/*
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311, style, isort, docs, minimal
3.12: py312, typecheck, slotscheck
[flake8]
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.tox,src/pdfje/vendor