@@ -49,6 +49,13 @@ classifiers = [
49
49
"Documentation" = " https://python-hyper.org/"
50
50
51
51
[dependency-groups ]
52
+ dev = [
53
+ { include-group = " testing" },
54
+ { include-group = " linting" },
55
+ { include-group = " packaging" },
56
+ { include-group = " docs" },
57
+ ]
58
+
52
59
testing = [
53
60
" pytest>=8.3.3,<9" ,
54
61
" pytest-cov>=6.0.0,<7" ,
@@ -109,3 +116,87 @@ source = [
109
116
" src/" ,
110
117
" .tox/**/site-packages/" ,
111
118
]
119
+
120
+ [tool .tox ]
121
+ min_version = " 4.23.2"
122
+ env_list = [ " py39" , " py310" , " py311" , " py312" , " py313" , " pypy3" , " lint" , " docs" , " packaging" ]
123
+
124
+ [tool .tox .gh-actions .python ]
125
+ "3.9" = [ " py39" , " h2spec" , " lint" , " docs" , " packaging" ]
126
+ "3.10" = [ " py310" ]
127
+ "3.11" = [ " py311" ]
128
+ "3.12" = [ " py312" ]
129
+ "3.13" = [ " py313" ]
130
+ "pypy3" = [ " pypy3" ]
131
+
132
+ [tool .tox .env_run_base ]
133
+ pass_env = [
134
+ " GITHUB_*" ,
135
+ ]
136
+ dependency_groups = [" testing" ]
137
+ commands = [
138
+ [" python" , " -bb" , " -m" , " pytest" , " --cov-report=xml" , " --cov-report=term" , " --cov=h2" , { replace = " posargs" , extend = true }]
139
+ ]
140
+
141
+ [tool .tox .env .pypy3 ]
142
+ # temporarily disable coverage testing on PyPy due to performance problems
143
+ commands = [
144
+ [" pytest" , { replace = " posargs" , extend = true }]
145
+ ]
146
+
147
+ [tool .tox .env .lint ]
148
+ dependency_groups = [" linting" ]
149
+ commands = [
150
+ [" ruff" , " check" , " src/" ],
151
+ [" mypy" , " src/" ],
152
+ ]
153
+
154
+ [tool .tox .env .docs ]
155
+ dependency_groups = [" docs" ]
156
+ allowlist_externals = [" make" ]
157
+ changedir = " {toxinidir}/docs"
158
+ commands = [
159
+ [" make" , " clean" ],
160
+ [" make" , " html" ],
161
+ ]
162
+
163
+ [tool .tox .env .packaging ]
164
+ base_python = [" python39" ]
165
+ dependency_groups = [" packaging" ]
166
+ allowlist_externals = [" rm" ]
167
+ commands = [
168
+ [" rm" , " -rf" , " dist/" ],
169
+ [" check-manifest" ],
170
+ [" python" , " -m" , " build" , " --outdir" , " dist/" ],
171
+ [" twine" , " check" , " dist/*" ],
172
+ ]
173
+
174
+ [tool .tox .env .publish ]
175
+ base_python = " {[tool.tox.env.packaging]base_python}"
176
+ deps = " {[tool.tox.env.packaging]deps}"
177
+ allowlist_externals = " {[tool.tox.env.packaging]allowlist_externals}"
178
+ commands = [
179
+ " {[testenv:packaging]commands}" ,
180
+ [" twine" , " upload" , " dist/*" ],
181
+ ]
182
+
183
+ [tool .tox .env .graphs ]
184
+ basepython = [" python3.9" ]
185
+ deps = [
186
+ " graphviz==0.14.1" ,
187
+ ]
188
+ commands = [
189
+ [" python" , " visualizer/visualize.py" , " -i" , " docs/source/_static" ],
190
+ ]
191
+
192
+ [tool .tox .env .h2spec ]
193
+ basepython = [" python3.9" ]
194
+ deps = [
195
+ " twisted[tls]==20.3.0" ,
196
+ ]
197
+ allowlist_externals = [
198
+ " {toxinidir}/tests/h2spectest.sh"
199
+ ]
200
+ commands = [
201
+ [" {toxinidir}/tests/h2spectest.sh" ],
202
+ ]
0 commit comments