Move the game-independent machinery (lobby, live-game store, websocket, deadline scheduler, match history, leaderboards) into a new tavolo-platform distribution behind a GameEngine contract, the scopone scientifico rules plus a platform adapter into tavolo-scopone, and keep only the composition root in tavolo-app. The three distributions share the tavolo namespace (PEP 420, kaya-style monorepo). Match history becomes fully generic: Match carries the engine's result JSON and MatchPlayer points/details instead of scopone-shaped team columns (migration 3 backfills existing rows). Lobby creation takes an opaque per-game options object and websocket actions dispatch to the session's engine. Tests: platform suite runs against a DummyEngine toy game, scopone keeps the rules tests plus new adapter tests, server/tests covers the wired stack end to end (194 tests, was 143).
53 lines
1008 B
TOML
53 lines
1008 B
TOML
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "tavolo-app"
|
|
version = "0.1.0"
|
|
description = "Tavolo multiplayer card-game application: platform + scopone game wiring"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"tavolo-platform",
|
|
"tavolo-scopone",
|
|
"kaya-core",
|
|
"kaya-cors",
|
|
"kaya-session",
|
|
"kaya-session-redis",
|
|
"kaya-oidc",
|
|
"kaya-openapi",
|
|
"kaya-rsgi",
|
|
"granian>=2.0",
|
|
"asyncpg",
|
|
"aerich",
|
|
"httpx",
|
|
"PyJWT[crypto]",
|
|
"pwo",
|
|
"PyYAML",
|
|
"redis",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"mypy",
|
|
"httpx-ws",
|
|
]
|
|
otel = [
|
|
"kaya-otel>=0.0.4",
|
|
]
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
namespaces = true
|
|
|
|
# Database migrations (aerich). See the Migrations section in README.md.
|
|
[tool.aerich]
|
|
tortoise_orm = "tavolo.aerich_config.TORTOISE_ORM"
|
|
location = "./migrations"
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
ignore_missing_imports = true
|
|
plugins = []
|