Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to allow use with tox-uv #11

Merged
merged 1 commit into from
Oct 29, 2024
Merged
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
29 changes: 15 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ env_list =
covreport
labels =
ci = py{38,39,310,311,312,313}, covcombine, covreport
minversion = 4.22.0

[testenv]
package = wheel
wheel_build_env = build_wheel
commands_pre = pip-install-dependency-groups test
dependency_groups = test
commands = coverage run -m pytest -v {posargs}

depends =
Expand All @@ -21,35 +22,36 @@ depends =
covreport: covcombine

[testenv:covclean]
commands_pre = pip-install-dependency-groups coverage
skip_install = true
dependency_groups = coverage
commands = coverage erase

[testenv:covcombine]
commands_pre = pip-install-dependency-groups coverage
skip_install = true
dependency_groups = coverage
commands = coverage combine

[testenv:covreport]
commands_pre =
pip-install-dependency-groups coverage
coverage html --fail-under=0
skip_install = true
dependency_groups = coverage
commands_pre = coverage html --fail-under=0
commands = coverage report


[testenv:lint]
commands_pre = pip-install-dependency-groups lint
dependency_groups = lint
commands = pre-commit run -a

[testenv:mypy]
commands_pre = pip-install-dependency-groups typing
dependency_groups = typing
commands = mypy src/


[testenv:twine-check]
description = "check the metadata on a package build"
allowlist_externals = rm
commands_pre =
pip-install-dependency-groups build
rm -rf dist/
dependency_groups = build
commands_pre = rm -rf dist/
# check that twine validating package data works
commands = python -m build
twine check dist/*
Expand All @@ -58,10 +60,9 @@ commands = python -m build
[testenv:docs]
description = "build docs with sphinx"
basepython = python3.12
dependency_groups = docs
allowlist_externals = rm
changedir = docs/
# clean the build dir before rebuilding
commands_pre =
pip-install-dependency-groups -f {toxinidir}/pyproject.toml docs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I left this one to keep a run with pip-install-dependency-groups. but a proper test would be better.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll work up some tests, so let's not worry about it and just get to a more ideal config. (But I'll probably focus on working up pip support before I come back to this, since ideally the pip wrapper can just be dropped in a 2.0 release at some point.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I think I'd prefer a dependency-groups command that produced a list of deps that I could feed to pip install or uv pip install or requirements.txt or whatever. :)

rm -rf _build/
commands_pre = rm -rf _build/
commands = sphinx-build -d _build/doctrees -b dirhtml -W . _build/dirhtml {posargs}
Loading