Files
RosterChief/pyproject.toml
Bernard Siebens ca34d26a8e feat(events): recurring event series with occurrence sync
Add EventSeries (club-scoped): an RFC-5545 rrule + dtstart + duration and a
template (kind/title/location/opponent + audience M2M). Concrete Event rows
are materialised occurrences carrying a series FK plus detached/cancelled
flags; the series tracks excluded_dates (EXDATEs) and a generated_until
horizon watermark.

Recurrence service:
- occurrence_datetimes expands the rrule (via python-dateutil) up to a
  horizon, minus EXDATEs.
- generate_occurrences materialises missing rows, copies the template +
  audience (so attendance syncs through the existing signals), and is
  idempotent.
- cancel_occurrence adds an EXDATE and deletes (or soft-cancels) one
  occurrence so it isn't regenerated; detach_occurrence marks an occurrence
  as independently edited; propagate_series re-applies the template to
  non-detached future occurrences.
- extend_event_series management command rolls the horizon forward.

Register EventSeries in the admin and surface series/detached/cancelled on
the Event admin. Add python-dateutil. Full suite at 100% coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 17:51:34 +02:00

49 lines
1.3 KiB
TOML

[project]
name = "clubmanager"
version = "0.1.0"
requires-python = ">=3.14"
dependencies = [
"dj-database-url>=3.1.2",
"django>=6.0.6",
"django-phonenumber-field[phonenumbers]>=8.4.0",
"pillow>=12.3.0",
"python-dateutil>=2.9.0.post0",
"python-decouple>=3.8",
]
[dependency-groups]
dev = [
"coverage>=7.15.0",
"ruff>=0.15.17",
]
[tool.ruff]
line-length = 250
target-version = "py314"
# Auto-generated migrations are not hand-maintained code.
extend-exclude = ["**/migrations/*"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"DJ", # flake8-django
"RUF", # ruff-specific rules
]
ignore = [
"RUF012", # Django/Wagtail model attrs (panels, Meta.ordering, ...) are framework conventions, not mutable defaults to guard.
"RUF005", # Wagtail's `Page.content_panels + [...]` concatenation is the documented idiom.
]
[tool.ruff.lint.per-file-ignores]
# Settings legitimately use star imports and long generated values.
"clubmanager/settings/*" = ["F403", "F405", "E501"]
[tool.ruff.lint.isort]
known-first-party = ["authentication", "club", "members", "teams", "events", "news", "pages", "home", "search", "clubmanager"]