M0: Projektgerüst für Hercules Pyloaded
CI / checks (push) Successful in 1m43s

- Django 6.0 mit Einstellungen aus Umgebungsvariablen (SQLite lokal, PostgreSQL im Betrieb)
- Pakete engine (reine Spielregeln) und game (Startseite, Health-Check, Worker-Platzhalter)
- uv mit Lockfile, ruff, mypy (strict für engine), pytest mit Smoke-Tests
- pre-commit-Hooks und vorbereiteter Gitea-Actions-Workflow
- Dockerfile und docker-compose (web, worker, db)
- README, CLAUDE.md, MIT-Lizenz

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hofei90
2026-09-25 11:50:40 +02:00
commit ec4b6c0b2f
36 changed files with 1410 additions and 0 deletions
+84
View File
@@ -0,0 +1,84 @@
[project]
name = "hercules-pyloaded"
version = "0.1.0"
description = "Hercules Pyloaded – Weltraum-Browsergame, Python-Neubau von Hercules (Warpman), Reloaded und Rereload"
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.12"
dependencies = [
"django>=6.0,<6.1",
"psycopg[binary]>=3.2",
"gunicorn>=23.0",
"whitenoise>=6.9",
]
[dependency-groups]
dev = [
"pytest>=8.3",
"pytest-django>=4.9",
"ruff>=0.13",
"mypy>=1.18",
"django-stubs[compatible-mypy]>=5.2",
"pre-commit>=4.3",
"uv>=0.12.19",
]
[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/config", "src/engine", "src/game"]
# --- ruff -------------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py312"
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", "W", # pycodestyle
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # bugbear
"SIM", # simplify
"DJ", # django
"RUF", # ruff-spezifisch
]
[tool.ruff.lint.per-file-ignores]
"src/*/migrations/*" = ["E501", "RUF012"]
# --- mypy -------------------------------------------------------------------
[tool.mypy]
python_version = "3.12"
mypy_path = "src"
packages = ["config", "engine", "game"]
plugins = ["mypy_django_plugin.main"]
check_untyped_defs = true
warn_unused_ignores = true
warn_redundant_casts = true
[[tool.mypy.overrides]]
# Die Spiel-Engine ist reiner, vollständig typisierter Code.
module = "engine.*"
strict = true
[[tool.mypy.overrides]]
module = "*.migrations.*"
ignore_errors = true
[tool.django-stubs]
django_settings_module = "config.settings"
# --- pytest -----------------------------------------------------------------
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "config.settings"
testpaths = ["tests"]
addopts = "-ra --strict-markers"