Skip to content

Commit 32a451a

Browse files
committed
uv
1 parent aa37ecd commit 32a451a

File tree

2 files changed

+6
-23
lines changed

2 files changed

+6
-23
lines changed

tests/pyproject.toml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
4-
51
[project]
62
name = "ccf-tests"
73
version = "0.0.0"
84
requires-python = ">=3.12"
9-
10-
[tool.hatch.metadata]
11-
allow-direct-references = true
12-
13-
[tool.hatch.envs.default]
14-
skip-install = true
155
dependencies = [
16-
"ccf @ {root:uri}/../python/",
6+
"ccf",
177
"wheel >= 0.46.2, < 0.47",
188
"loguru >= 0.7.3, < 0.8",
199
"openapi-spec-validator >= 0.7.2, < 0.8",
@@ -44,5 +34,5 @@ dependencies = [
4434
"aiohttp >= 3.13.0, < 4",
4535
]
4636

47-
[tool.hatch.envs.default.scripts]
48-
commit-latency = "python commit_latency.py {args}"
37+
[tool.uv.sources]
38+
ccf = { path = "../python/", editable = true }

tests/tests.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,13 @@
55
set -e
66

77
echo "Setting up Python environment..."
8-
if [ ! -f "env/bin/activate" ]
9-
then
10-
python3 -m venv env
11-
fi
12-
13-
source env/bin/activate
14-
pip install -q -U pip
15-
pip install -q -U -e ../python/
16-
pip install -q -U -r ../tests/requirements.txt
8+
uv sync --project ../tests
9+
source ../tests/.venv/bin/activate
1710
echo "Python environment successfully setup"
1811

1912
# Export where the VENV has been set, so tests running
2013
# a sandbox.sh can inherit it rather create a new one
21-
VENV_DIR=$(realpath env)
14+
VENV_DIR=$(realpath ../tests/.venv)
2215
export VENV_DIR="$VENV_DIR"
2316

2417
# Enable https://github.com/Qix-/better-exceptions

0 commit comments

Comments
 (0)