Skip to content

Commit

Permalink
chore: migrate tox.ini to pyproject.toml (#2289)
Browse files Browse the repository at this point in the history
<!-- 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 -->
  • Loading branch information
njzjz authored Oct 20, 2024
1 parent 2375261 commit 18ad1e4
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
python-version: '3.11'
architecture: 'x64'
- run: pip install tox tox-gh-actions tox-uv
- run: pip install tox tox-gh tox-uv
- run: tox
- uses: codecov/codecov-action@v4
with:
Expand Down
63 changes: 63 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,66 @@ ignore = [

[tool.ruff.pydocstyle]
convention = "numpy"

[tool.tox]
requires = ["tox>=4.19"]
env_list = [
"3.13",
"3.12",
"3.11",
"3.10",
"3.9",
"3.8",
"3.7",
"docs",
]

[tool.tox.env_run_base]
description = "Run test under {base_python}"
package = "editable"
extras = [
"test",
]
pass_env = [
"CI",
"CODACY_*",
"CODECOV_*",
"GITHUB_*",
"TOXENV",
]
set_env = { DEBUG = "1" }
commands = [[
"pytest",
"--pyargs",
"tests",
"--cov",
"--cov-report",
"term",
"--cov-report",
"xml",
"--cov-config={toxinidir}/pyproject.toml"
]]

[tool.tox.env.docs]
description = "invoke sphinx-build to build the HTML docs"
extras = [
"docs",
]
commands = [[
"make",
"-C",
"{toxinidir}/docs",
"html"
]]
allowlist_externals = [
"make",
]

[tool.tox.gh.python]
"3.13" = ["3.13"]
"3.12" = ["3.12"]
"3.11" = ["3.11"]
"3.10" = ["3.10"]
"3.9" = ["3.9"]
"3.8" = ["3.8"]
"3.7" = ["3.7"]
42 changes: 0 additions & 42 deletions tox.ini

This file was deleted.

0 comments on commit 18ad1e4

Please sign in to comment.