Recto personnalisable (fond image + champs positionnés : nom, poste(s)
affectés, catégorie, rôle) via un éditeur visuel glisser-déposer ; verso
fixe, la même image pour tous les bénévoles. Nouvel écran « Badges »
(COORDINATION uniquement, /badges).
Backend : modèle BadgeTemplate/BadgeField (migration 0011), génération
PDF isolée (app/badges/pdf.py, ReportLab — planches recto suivies des
planches verso correspondantes pour une impression recto-verso), route
POST /editions/{id}/badges/generate, tests (module pur + API).
Frontend : client HTTP (upload multipart, réponses binaires images/PDF),
client mock (mode démonstration), éditeur de positionnement en
millimètres (coordonnées partagées avec le backend), écran de génération
avec sélection des bénévoles et téléchargement.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
55 lines
1.0 KiB
TOML
55 lines
1.0 KiB
TOML
[project]
|
|
name = "benevoles-backend"
|
|
version = "0.1.0"
|
|
description = "API de gestion des bénévoles d'un festival"
|
|
requires-python = ">=3.12,<3.13"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"uvicorn[standard]>=0.32",
|
|
"sqlmodel>=0.0.22",
|
|
"alembic>=1.14",
|
|
"psycopg[binary]>=3.2",
|
|
"pydantic-settings>=2.6",
|
|
"python-multipart>=0.0.12",
|
|
"openpyxl>=3.1",
|
|
"pyjwt>=2.9",
|
|
"bcrypt>=4.1",
|
|
"ortools>=9.11",
|
|
"reportlab>=4.2",
|
|
"pillow>=11.0",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.3",
|
|
"pytest-cov>=6.0",
|
|
"httpx>=0.27",
|
|
"ruff>=0.8",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["app"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP", "B"]
|
|
|
|
[tool.ruff.lint.flake8-bugbear]
|
|
extend-immutable-calls = [
|
|
"fastapi.Depends",
|
|
"fastapi.File",
|
|
"fastapi.Form",
|
|
"fastapi.Query",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "-ra"
|