Feuilles de poste : ajouter la programmation du jour (horaires artistes)

Sous le référent, la liste des artistes qui jouent ce jour-là (heure de
passage + nom), tous postes confondus — repère utile même hors de la
régie (affluence prévisible au bar, sécurité...). Triée par horaire,
omise si aucun artiste ne joue ce jour-là.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
AdamThomas
2026-09-23 21:01:48 +02:00
co-authored by Claude Sonnet 5
parent 957a004623
commit 8f8350aa1b
5 changed files with 98 additions and 4 deletions
+24
View File
@@ -5,6 +5,7 @@ import datetime as dt
from app.sheets.pdf import (
PositionDaySheet,
SheetArtist,
SheetShift,
SheetVolunteer,
generate_position_sheets_pdf,
@@ -118,3 +119,26 @@ def test_a_volunteer_photo_makes_the_pdf_larger():
[_sheet(volunteers=(SheetVolunteer(name="Alex Martin", phone=None, photo=_PNG),))]
)
assert len(with_photo) > len(without_photo)
def test_generates_a_valid_pdf_with_the_day_lineup():
sheet = PositionDaySheet(
position_name="Bar central", position_location="Chapiteau",
date=dt.date(2026, 7, 10), shifts=(),
artists=(
SheetArtist(name="Chilla", start_time=dt.time(20, 0), end_time=dt.time(21, 0)),
SheetArtist(name="XYZ", start_time=dt.time(21, 30), end_time=dt.time(23, 0)),
),
)
pdf = generate_position_sheets_pdf([sheet])
assert pdf.startswith(b"%PDF")
def test_generates_a_valid_pdf_without_a_lineup():
sheet = PositionDaySheet(
position_name="Bar central", position_location="Chapiteau",
date=dt.date(2026, 7, 10), shifts=(),
)
assert sheet.artists == ()
pdf = generate_position_sheets_pdf([sheet])
assert pdf.startswith(b"%PDF")