Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
125 lines (110 loc) · 2.71 KB
/
Copy pathtox.ini
File metadata and controls
125 lines (110 loc) · 2.71 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[tox]
envlist =
# Show OS dependencies
deps,
# Run on all our Pythons:
py3{10-15},
# Run with no extras on lowest and highest version:
py3{10,15}-no_extras,
# And the rest:
pypy3, coverage, docs, quality
labels =
ci-tests = deps,py3{10-15},py3{10,15}-no_extras,pypy3
[testenv]
package = wheel
wheel_build_env = .pkg
deps =
-r{toxinidir}/requirements/test.txt
no_extras: pip
extras =
!no_extras: toml,yaml
allowlist_externals =
make
rm
passenv =
COVERAGE_*
setenv =
no_extras: SCRIV_TEST_NO_EXTRAS=1
commands =
no_extras: python -m pip uninstall -q -y tomli
coverage run -p -m pytest -Wd -c tox.ini {posargs}
[testenv:.pkg]
# Force wheels to be built with the latest pip, wheel, and setuptools.
set_env =
VIRTUALENV_DOWNLOAD=1
[testenv:deps]
allowlist_externals =
pandoc
commands =
pandoc --version
[testenv:coverage]
depends = py3{10-15}, pypy3
basepython = python3.12
commands =
coverage combine -q
coverage report -m --skip-covered
coverage html
coverage json
parallel_show_output = true
[testenv:docs]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements/doc.txt
commands =
make -C docs clean html
doc8 -q --ignore-path docs/include README.rst docs
[testenv:quality]
deps =
-r{toxinidir}/requirements/quality.txt
commands =
ruff format --check --diff src/scriv tests docs
python -m cogapp -cP --check --verbosity=1 docs/*.rst
mypy src/scriv tests
pylint src/scriv tests docs
pycodestyle src/scriv tests docs
pydocstyle src/scriv tests docs
isort --check-only --diff -p scriv tests src/scriv
python -Im build
twine check --strict dist/*
[testenv:upgrade]
commands =
python -m pip install -U pip
make upgrade
# Tools needed for running tests need to be configured in tox.ini instead of
# pyproject.toml so that we can run tests without tomli installed on Pythons
# before 3.11.
#
# The py*-no_extras tox environment uninstalls tomli so that we can ensure
# scriv works properly in that world without tomli. Tools like pytest and
# coverage will find settings in pyproject.toml, but then fail because
# they can't import tomli to read the settings.
[pytest]
addopts = -rfe
norecursedirs = .* docs requirements
[coverage:run]
branch = True
source =
scriv
tests
omit =
*/__main__.py
[coverage:report]
precision = 2
exclude_also =
def __repr__
pragma: only failure
[coverage:paths]
source =
src
*/site-packages
others =
.
*/scriv
# Pycodestyle doesn't read from pyproject.toml, so configure it here.
[pycodestyle]
exclude = .git,.tox
; E203 = whitespace before ':'
; E501 line too long
; W503 line break before binary operator
ignore = E203,E501,W503