Paper Dynasty Database - PostgreSQL database service
Go to file
Cal Corum a2d2aa3d31 feat(WP-13): post-game callback endpoints for season stats and evolution
Implements two new API endpoints the bot calls after a game completes:

  POST /api/v2/season-stats/update-game/{game_id}
    Delegates to update_season_stats() service (WP-05). Returns
    {"updated": N, "skipped": bool} with idempotency via ProcessedGame ledger.

  POST /api/v2/evolution/evaluate-game/{game_id}
    Finds all (player_id, team_id) pairs from the game's StratPlay rows,
    calls evaluate_card() for each pair that has an EvolutionCardState,
    and returns {"evaluated": N, "tier_ups": [...]} with full tier-up detail.

New files:
  app/services/evolution_evaluator.py — evaluate_card() service (WP-08)
  tests/test_postgame_evolution.py    — 10 integration tests (all pass)

Modified files:
  app/routers_v2/season_stats.py — rewritten to delegate to the service
  app/routers_v2/evolution.py    — evaluate-game endpoint added
  app/main.py                    — season_stats router registered

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 16:05:21 -05:00
.gitea/workflows fix: remove Docker Hub registry cache to unblock builds 2026-03-16 17:11:08 +00:00
app feat(WP-13): post-game callback endpoints for season stats and evolution 2026-03-18 16:05:21 -05:00
docs Remove deprecated legacy files and reorganize documentation 2026-02-05 13:34:09 -06:00
migrations Merge pull request 'feat(WP-10): pack opening hook — evolution_card_state initialization' (#107) from feature/wp10-pack-opening-hook into card-evolution 2026-03-18 20:31:59 +00:00
scripts Add production deployment config and fix stringified list parsing 2026-01-30 14:03:07 -06:00
storage/templates fix: add asyncio.Lock to get_browser() and deduplicate font-face blocks 2026-03-13 08:28:58 -05:00
tests feat(WP-13): post-game callback endpoints for season stats and evolution 2026-03-18 16:05:21 -05:00
.dockerignore Add .dockerignore 2026-01-30 22:47:07 -06:00
.env fix: correct inverted TESTING env check and leading space in .env (#23) 2026-03-03 21:43:54 +00:00
.env.example CLAUDE: Add .env.example with comprehensive configuration guide 2025-11-07 11:53:23 -06:00
.gitignore ci: Use Gitea API for tag creation to avoid branch protection issues 2026-02-17 17:23:21 -06:00
CLAUDE.md docs: add next-release branch workflow to CLAUDE.md 2026-03-03 10:56:03 -06:00
compose.production.yml Add production deployment config and fix stringified list parsing 2026-01-30 14:03:07 -06:00
docker-compose.yml CLAUDE: Comment out API service - prevents race condition in db_engine.py 2025-11-07 14:07:13 -06:00
Dockerfile fix: restore Dockerfile to match card-evolution base after retarget 2026-03-18 15:30:01 -05:00
LICENSE Initial commit 2023-02-19 21:38:07 -06:00
pyproject.toml feat: Track Catalog API endpoints (WP-06) (#71) 2026-03-12 20:40:38 -05:00
requirements.txt chore: pin all Python dependency versions in requirements.txt (#64) 2026-03-10 01:35:31 -05:00
ruff.toml fix: address PR review findings 2026-03-17 21:38:12 -05:00
VERSION Bump version to 1.5.5 2026-02-04 08:48:12 -06:00