-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
tox.ini
193 lines (174 loc) · 5.38 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[tox]
minversion=2.0
isolated_build=True
envlist=
# Test all Python versions on latest lib versions
py3{9,10,11,12,13}-sphx_latest-attrs_latest-jsch_latest
# Test leading Python version on current in-repo dev lib versions
py313-sphx_dev-attrs_dev-jsch_dev
# Scan across Sphinx versions
py313-sphx_{1_6_x,1_x,2_x,4_x,5_x,6_x,7_x,dev}-attrs_latest-jsch_latest
# sphx_3_x is incompatible with py310 due to a typing import. Test on py39 instead.
py39-sphx_3_x-attrs_latest-jsch_latest
# Scan attrs versions
py313-sphx_latest-attrs_{19_2,19_3,20_1,20_2,20_3,21_2,21_3,22_2,23_2,dev}-jsch_latest
# Scan jsonschema versions
py313-sphx_latest-attrs_latest-jsch_{3_0,3_x,4_0,4_8,4_14,4_20,dev}
# Earliest supported Python and lib versions all together
py39-sphx_1_6_x-attrs_19_2-jsch_3_0
# Spot matrix of early Python, Sphinx, attrs versions
py3{9,10}-sphx_{1,2}_x-attrs_{19,20}_2-jsch_latest
# Test the specific Sphinx threshold cases where behavior changed
py312-sphx_{2_3_1,2_4_0,3_2_1,3_3_0,3_4_0}-attrs_latest-jsch_latest
# Simple 'does the sdist install' check
sdist_install
# Lints
flake8
# Sphinx link check
linkcheck
[testenv]
commands=
python --version
pip list
# Want the tox *matrix* to ignore warnings since it's primarily
# a compatibility check. The defaults for bare pytest enable -Werror
pytest {posargs:--nonloc -Wignore}
deps=
sphx_1_6_x: sphinx<1.7
sphx_1_x: sphinx<2
sphx_2_x: sphinx<3
sphx_3_x: sphinx<4
sphx_4_x: sphinx<5
sphx_5_x: sphinx<6
sphx_6_x: sphinx<7
sphx_7_x: sphinx<8
sphx_2_3_1: sphinx==2.3.1
sphx_2_4_0: sphinx==2.4.0
sphx_3_2_1: sphinx==3.2.1
sphx_3_3_0: sphinx==3.3.0
sphx_3_4_0: sphinx==3.4.0
sphx_latest: sphinx
sphx_dev: git+https://github.com/sphinx-doc/sphinx
attrs_19_2: attrs==19.2
attrs_19_3: attrs==19.3
attrs_20_1: attrs==20.1
attrs_20_2: attrs==20.2
attrs_20_3: attrs==20.3
attrs_21_2: attrs==21.2
attrs_21_3: attrs==21.3
attrs_22_2: attrs==22.2
attrs_23_2: attrs==23.2
attrs_latest: attrs
attrs_dev: git+https://github.com/python-attrs/attrs
jsch_3_0: jsonschema==3.0
jsch_3_x: jsonschema<4
jsch_4_0: jsonschema<4.1
jsch_4_8: jsonschema<4.9
jsch_4_14: jsonschema<4.15
jsch_4_20: jsonschema<4.21
jsch_latest: jsonschema
jsch_dev: git+https://github.com/Julian/jsonschema
dictdiffer
pytest>=4.4.0
pytest-check>=1.1.2
pytest-ordering
pytest-timeout
stdio-mgr>=1.0.1
sphinx-issues
sphinx-rtd-theme
sphinxcontrib-programoutput
[testenv:linux]
platform=linux
basepython=
py313: python3.13
py312: python3.12
py311: python3.11
py310: python3.10
py39: python3.9
[testenv:black]
skip_install=True
deps=black
commands=
black {posargs} .
[testenv:flake8]
skip_install=True
deps=-rrequirements-flake8.txt
commands=
flake8 ./conftest.py src tests
[testenv:flake8-noqa]
skip_install=True
deps=-rrequirements-flake8.txt
commands=
pip install flake8-noqa
flake8 --color=never --exit-zero ./conftest.py tests src
[testenv:interrogate]
skip_install=True
deps=interrogate
commands=
interrogate {posargs} conftest.py tests src
[testenv:linkcheck]
skip_install=True
deps=-rrequirements-dev.txt
allowlist_externals=
make
changedir=doc
commands=
make linkcheck
[testenv:sdist_install]
commands=
python -Werror -c "import sphobjinv"
deps=
[pytest]
markers =
local: Tests not requiring Internet access
nonloc: Tests requiring Internet access
cli: Command-line interface tests
api: Direct API tests
intersphinx: Tests on intersphinx-related functionality
fixture: Trivial tests for test suite fixtures
testall: Tests that use *all* objects_xyz.inv files in tests/resource, if --testall is specified
flake8_ext: Test checking that all desired plugins are active
first: Inherited marker from `pytest-ordering`
timeout: Inherited marker from `pytest-timeout`
addopts = --strict-markers -rsxX -Werror
norecursedirs = .* env* src *.egg dist build
xfail_strict = True
[flake8]
exclude =
src/sphobjinv/_vendored
# W503: black formats binary operators to start of line
# A005: Submodules are going to be shadowing builtins for the moment
ignore = W503,A005
show_source = True
max_line_length = 88
format = %(cyan)s%(path)s%(reset)s:%(yellow)s%(row)d%(reset)s:%(green)s%(col)d%(reset)s %(red)s(%(code)s)%(reset)s %(text)s
rst-roles =
attr,
class,
data,
doc,
exc,
func,
meth,
mod,
option,
ref,
rst-directives =
doctest,
versionadded,
versionchanged,
per_file_ignores =
# D202: No-space-after-docstring is ugly when the first command is a class/def
# S101: pytest uses asserts liberally
# RST30x: linter can't know about substitutions/references in rst_epilog
src/*: RST305,RST306
tests/*: S101, RST305,RST306
conftest.py: D202, S101, RST305,RST306
# F401: MANY things imported but unused in __init__.py files
src/sphobjinv/__init__.py: F401, RST305,RST306
src/sphobjinv/cli/__init__.py: F401, RST305,RST306
# PIE786: CLI uses 'except Exception:' as a catchall... to be changed, eventually
src/sphobjinv/cli/*: PIE786, RST305,RST306
#flake8-import-order
import-order-style = smarkets
application-import-names = sphobjinv