Skip to content

Commit 18ad1e4

Browse files
authored
chore: migrate tox.ini to pyproject.toml (#2289)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced testing capabilities with new Tox configurations for multiple Python versions (3.7 to 3.13) and added support for documentation generation. - **Bug Fixes** - Improved workflow concurrency settings for better management of test runs. - **Documentation** - Updated dependencies and commands for coverage reporting and type checking. - **Chores** - Removed the outdated `tox.ini` file to streamline configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 2375261 commit 18ad1e4

File tree

3 files changed

+64
-43
lines changed

3 files changed

+64
-43
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
with:
2323
python-version: '3.11'
2424
architecture: 'x64'
25-
- run: pip install tox tox-gh-actions tox-uv
25+
- run: pip install tox tox-gh tox-uv
2626
- run: tox
2727
- uses: codecov/codecov-action@v4
2828
with:

pyproject.toml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,66 @@ ignore = [
173173

174174
[tool.ruff.pydocstyle]
175175
convention = "numpy"
176+
177+
[tool.tox]
178+
requires = ["tox>=4.19"]
179+
env_list = [
180+
"3.13",
181+
"3.12",
182+
"3.11",
183+
"3.10",
184+
"3.9",
185+
"3.8",
186+
"3.7",
187+
"docs",
188+
]
189+
190+
[tool.tox.env_run_base]
191+
description = "Run test under {base_python}"
192+
package = "editable"
193+
extras = [
194+
"test",
195+
]
196+
pass_env = [
197+
"CI",
198+
"CODACY_*",
199+
"CODECOV_*",
200+
"GITHUB_*",
201+
"TOXENV",
202+
]
203+
set_env = { DEBUG = "1" }
204+
commands = [[
205+
"pytest",
206+
"--pyargs",
207+
"tests",
208+
"--cov",
209+
"--cov-report",
210+
"term",
211+
"--cov-report",
212+
"xml",
213+
"--cov-config={toxinidir}/pyproject.toml"
214+
]]
215+
216+
[tool.tox.env.docs]
217+
description = "invoke sphinx-build to build the HTML docs"
218+
extras = [
219+
"docs",
220+
]
221+
commands = [[
222+
"make",
223+
"-C",
224+
"{toxinidir}/docs",
225+
"html"
226+
]]
227+
allowlist_externals = [
228+
"make",
229+
]
230+
231+
[tool.tox.gh.python]
232+
"3.13" = ["3.13"]
233+
"3.12" = ["3.12"]
234+
"3.11" = ["3.11"]
235+
"3.10" = ["3.10"]
236+
"3.9" = ["3.9"]
237+
"3.8" = ["3.8"]
238+
"3.7" = ["3.7"]

tox.ini

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)