-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
tox.ini
173 lines (156 loc) · 4.99 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
[tox]
minversion=2.0
isolated_build=True
envlist=
# Test all Python versions on latest lib versions
py3{6,7,8,9,10,11}-sphx_latest-attrs_latest-jsch_latest
# Test dev Python version on current in-repo dev lib versions
py310-sphx_dev-attrs_dev-jsch_dev
# Scan across Sphinx versions
py310-sphx_{1_6_x,1_x,2_x,4_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
py310-sphx_latest-attrs_{19_2,19_3,20_1,20_2,20_3,21_2,21_3,dev}-jsch_latest
# Scan jsonschema versions
py310-sphx_latest-attrs_latest-jsch_{3_0,3_1,3_2,4_0,4_1,dev}
# Earliest supported Python and lib versions all together
py36-sphx_1_6_x-attrs_19_2-jsch_3_0
# Spot matrix of early Python, Sphinx, attrs versions
py3{7,8,9}-sphx_{1,2}_x-attrs_{19,20}_2-jsch_latest
# Test the specific Sphinx threshold cases where behavior changed
py310-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
[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_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_latest: attrs
attrs_dev: git+https://github.com/python-attrs/attrs
jsch_3_0: jsonschema<3.1
jsch_3_1: jsonschema<3.2
jsch_3_2: jsonschema<3.3
jsch_4_0: jsonschema<4.1
jsch_4_1: jsonschema<4.2
jsch_4_2: jsonschema<4.3
jsch_4_3: jsonschema<4.4
jsch_latest: jsonschema
jsch_dev: git+https://github.com/Julian/jsonschema
dictdiffer
pytest>=4.4.0
pytest-check>=0.4
pytest-ordering
pytest-timeout
stdio-mgr>=1.0.1
sphinx-issues==0.4.0
sphinx-rtd-theme
sphinxcontrib-programoutput
[testenv:linux]
platform=linux
basepython=
py311: python3.11
py310: python3.10
py39: python3.9
py38: python3.8
py37: python3.7
py36: python3.6
[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: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
readme: Testing shell examples in README.rst
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
ignore = W503
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