Skip to content

Commit

Permalink
Make uv use constraints like pip
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea committed Jan 17, 2025
1 parent 6178262 commit 6847582
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{envdir}/.coverage.{envname}}
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
PIP_CONSTRAINT = {toxinidir}/.config/constraints.txt
devel,pkg,pre,py310: PIP_CONSTRAINT = /dev/null
UV_CONSTRAINT = {toxinidir}/.config/constraints.txt
devel,pkg,pre,py310,lint,hook,deps,schemas: PIP_CONSTRAINT = /dev/null
devel,pkg,pre,py310,lint,hook,deps,schemas: UV_CONSTRAINT = /dev/null
lower: PIP_CONSTRAINT = {toxinidir}/.github/lower-constraints.txt
lower: UV_CONSTRAINT = {toxinidir}/.github/lower-constraints.txt
PIP_DISABLE_PIP_VERSION_CHECK = 1
PRE_COMMIT_COLOR = always
# Number of expected test passes, safety measure for accidental skip of
Expand Down Expand Up @@ -108,23 +112,15 @@ commands =
passenv =
{[testenv]passenv}
PRE_COMMIT_HOME
setenv =
{[testenv]setenv}
# avoid messing pre-commit with out own constraints
PIP_CONSTRAINT=

[testenv:lower]
description = Install using lower-constraints.txt file for testing oldest versions.
setenv =
PIP_CONSTRAINT = {toxinidir}/.github/lower-constraints.txt

[testenv:hook]
description = Validate pre-commit hook definition
deps = pre-commit
commands =
./tools/test-hook.sh
setenv =
PIP_CONSTRAINT=/dev/null

[testenv:deps]
description = Bump all test dependencies
Expand All @@ -134,9 +130,6 @@ skip_install = true
basepython = python3.10
deps =
{[testenv:lint]deps}
setenv =
# without his upgrade would likely not do anything
PIP_CONSTRAINT = /dev/null
commands_pre =
commands =
-pre-commit run --all-files --show-diff-on-failure --hook-stage manual lock
Expand Down Expand Up @@ -178,9 +171,6 @@ commands =
description = Rebuild and test JSON Schemas
deps =
check-jsonschema>=0.26.3
setenv =
# without this upgrade would likely not do anything
PIP_CONSTRAINT = /dev/null
skip_install = true
changedir = test/schemas
commands_pre =
Expand Down

0 comments on commit 6847582

Please sign in to comment.