Migrate the backend from pip to uv
CI / Build and push docker image (push) Successful in 2m42s

Replace requirements.txt with a uv workspace and lockfile, install the five tavolo packages from packages/* in development and non-editable in the image, and build the Docker image with uv. Move dev tools to a PEP 735 dependency group and refresh the locked dependency versions.
This commit is contained in:
2026-10-20 07:25:25 +08:00
parent 03a571a6a5
commit 2d5c64218f
15 changed files with 1975 additions and 252 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ The deployable tavolo application: the composition root wiring
## Development (from `packages/tavolo-app/`)
```sh
.venv/bin/python -m mypy --namespace-packages --explicit-package-bases \
uv run mypy --namespace-packages --explicit-package-bases \
src/tavolo/app.py \
src/tavolo/config.py \
src/tavolo/telemetry.py \
+6 -4
View File
@@ -31,10 +31,6 @@ dependencies = [
]
[project.optional-dependencies]
dev = [
"mypy",
"httpx-ws",
]
otel = [
"kaya-otel>=0.0.7",
"opentelemetry-instrumentation-asyncpg>=0.66b0",
@@ -42,6 +38,12 @@ otel = [
"opentelemetry-instrumentation-system-metrics>=0.66b0",
]
[dependency-groups]
dev = [
"mypy",
"httpx-ws",
]
[tool.setuptools.packages.find]
where = ["src"]
namespaces = true
+2 -2
View File
@@ -92,8 +92,8 @@ the match), so the hand-ack timeout is accepted but unused.
## Development (from `server/`)
```sh
.venv/bin/python -m unittest discover -s packages/tavolo-briscola/tests
.venv/bin/python -m mypy -p tavolo.briscola
uv run python -m unittest discover -s packages/tavolo-briscola/tests
uv run mypy -p tavolo.briscola
```
`test_engine.py`/`test_plugin.py` cover the two classic variants;
+2 -2
View File
@@ -58,8 +58,8 @@ examples are [`tavolo-scopone`](../tavolo-scopone/README.md),
## Development (from `server/`)
```sh
.venv/bin/python -m unittest discover -s packages/tavolo-platform/tests
.venv/bin/python -m mypy -p tavolo.platform
uv run python -m unittest discover -s packages/tavolo-platform/tests
uv run mypy -p tavolo.platform
```
Tests run fully in-process against a `DummyEngine` (a two-player toy game
+2 -2
View File
@@ -36,8 +36,8 @@ application composition root.
## Development (from `server/`)
```sh
.venv/bin/python -m unittest discover -s packages/tavolo-scopa/tests
.venv/bin/python -m mypy -p tavolo.scopa
uv run python -m unittest discover -s packages/tavolo-scopa/tests
uv run mypy -p tavolo.scopa
```
`test_engine.py` covers the pure rules; `test_plugin.py` covers the
+2 -2
View File
@@ -31,8 +31,8 @@ application composition root.
## Development (from `server/`)
```sh
.venv/bin/python -m unittest discover -s packages/tavolo-scopone/tests
.venv/bin/python -m mypy -p tavolo.scopone
uv run python -m unittest discover -s packages/tavolo-scopone/tests
uv run mypy -p tavolo.scopone
```
`test_engine.py` covers the pure rules; `test_plugin.py` covers the