Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: tox-ini-fmt
args: ["-p", "fix"]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.4.3"
rev: "v2.5.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
Expand Down
29 changes: 20 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,35 @@ dynamic = [
]
dependencies = [
"packaging>=24.1",
"tox<5,>=4.21.2",
"tox>=4.21.2,<5",
"typing-extensions>=4.12.2; python_version<'3.10'",
"uv<1,>=0.4.18",
"uv>=0.4.18,<1",
]
optional-dependencies.testing = [
urls.Changelog = "https://github.com/tox-dev/tox-uv/releases"
urls.Documentation = "https://github.com/tox-dev/tox-uv#tox-uv"
urls.Homepage = "https://github.com/tox-dev/tox-uv"
urls.Source = "https://github.com/tox-dev/tox-uv"
urls.Tracker = "https://github.com/tox-dev/tox-uv/issues"
entry-points.tox.tox-uv = "tox_uv.plugin"

[dependency-groups]
dev = [
{ include-group = "lint" },
{ include-group = "pkg-meta" },
{ include-group = "test" },
{ include-group = "type" },
]
test = [
"covdefaults>=2.3",
"devpi-process>=1.0.2",
"diff-cover>=9.2",
"pytest>=8.3.3",
"pytest-cov>=5",
"pytest-mock>=3.14",
]
urls.Changelog = "https://github.com/tox-dev/tox-uv/releases"
urls.Documentation = "https://github.com/tox-dev/tox-uv#tox-uv"
urls.Homepage = "https://github.com/tox-dev/tox-uv"
urls.Source = "https://github.com/tox-dev/tox-uv"
urls.Tracker = "https://github.com/tox-dev/tox-uv/issues"
entry-points.tox.tox-uv = "tox_uv.plugin"
type = [ "mypy==1.11.2", { include-group = "test" } ]
lint = [ "pre-commit-uv>=4.1.3" ]
pkg-meta = [ "check-wheel-contents>=0.6", "twine>=5.1.1", "uv>=0.4.18" ]

[tool.hatch]
build.hooks.vcs.version-file = "src/tox_uv/version.py"
Expand Down
12 changes: 4 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ skip_missing_interpreters = true
description = run the unit tests with pytest under {base_python}
package = wheel
wheel_build_env = .pkg
extras =
testing
pass_env =
DIFF_AGAINST
PYTEST_*
Expand All @@ -32,6 +30,7 @@ commands =
--junitxml {work_dir}{/}junit.{env_name}.xml \
tests}
diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} {work_dir}{/}coverage.{env_name}.xml --fail-under 100
dependency_groups = test

[testenv:fix]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
Expand All @@ -43,27 +42,24 @@ commands =

[testenv:type]
description = run type check on code base
deps =
mypy==1.11.2
commands =
mypy src
mypy tests
dependency_groups = type

[testenv:pkg_meta]
description = check that the long description is valid
skip_install = true
deps =
check-wheel-contents>=0.6
twine>=5.1.1
uv>=0.4.18
commands =
uv build --sdist --wheel --out-dir {env_tmp_dir} .
twine check {env_tmp_dir}{/}*
check-wheel-contents --no-config {env_tmp_dir}
dependency_groups = pkg-meta

[testenv:dev]
description = generate a DEV environment
package = editable
commands =
uv pip tree
python -c 'import sys; print(sys.executable)'
dependency_groups = dev