Commit Graph

26 Commits

Author SHA1 Message Date
Cal Corum
ddf6ff5961 feat: Track Catalog API endpoints (WP-06) (#71)
Closes #71

Adds GET /api/v2/evolution/tracks and GET /api/v2/evolution/tracks/{track_id}
endpoints for browsing evolution tracks and their thresholds.  Both endpoints
require Bearer token auth and return a track dict with formula and t1-t4
threshold fields.  The card_type query param filters the list endpoint.

EvolutionTrack is lazy-imported inside each handler so the app can start
before WP-01 (EvolutionTrack model) is merged into next-release.

Also suppresses pre-existing E402/F541 ruff warnings in app/main.py via
pyproject.toml per-file-ignores so the pre-commit hook does not block
unrelated future commits to that file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 20:40:38 -05:00
Cal Corum
5e182bedac feat: add scout_opportunities and scout_claims tables and API endpoints (#44)
Support the Discord bot's new scouting feature where players can scout
cards from other teams' opened packs. Stores opportunities with expiry
timestamps and tracks which teams claim which cards.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 03:45:38 +00:00
Cal Corum
053fcbab05 fix: centralize logging config in main.py — remove basicConfig from 32 files (#26)
Moved logging.basicConfig() to app/main.py as the single source of truth.
Removed duplicate (no-op) calls from app/db_engine.py, app/dependencies.py,
and all 30 router files in app/routers_v2/. Removed the now-unused LOG_DATA
dict and date/log_level locals from dependencies.py and db_engine.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 03:22:02 +00:00
Cal Corum
8d86b3fec6 fix: replace 467 manual db.close() calls with middleware (#30)
Add db_session_middleware to main.py that opens the connection at the
start of each request and closes it in a try/finally block, ensuring
connections are always returned even on uncaught exceptions.

Remove all individual db.close() calls from 30 router files in
app/routers_v2/ — the middleware now handles all code paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 15:52:56 -06:00
Cal Corum
65ad72c299 fix: remove debug print(req.scope) from get_docs route (#31)
All checks were successful
Build Docker Image / build (pull_request) Successful in 9m50s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 22:36:15 -06:00
Cal Corum
1e4569dfbf Clean up root_validators
Remove root_path from FastAPI
Update Season 8 Cardsets
Force pydantic 1.x
2024-11-03 01:46:40 -05:00
Cal Corum
75e2f05f48 Add support for Swagger 2024-07-11 15:06:58 -05:00
Cal Corum
889db717d1 Update for Swagger URL 2024-07-07 22:18:51 -05:00
Cal Corum
714345c589 Decision endpoint functional 2023-10-22 00:08:11 -05:00
Cal Corum
edde7a1b82 StratPlays added 2023-10-21 19:54:31 -05:00
Cal Corum
0b3c4b2f55 Added StratGame to db 2023-10-21 15:31:49 -05:00
Cal Corum
485a046855 First pass of real card gen 2023-10-11 00:58:30 -05:00
Cal Corum
89aebd441d Phase 1 card images 2023-09-24 18:59:32 -05:00
Cal Corum
8a0d094227 Scouting tables added to db 2023-09-22 01:29:35 -05:00
Cal Corum
d5386f86f8 Added /scouting 2023-09-17 00:25:42 -05:00
Cal Corum
995735d878 Added cardpositions 2023-09-16 18:36:15 -05:00
Cal Corum
51a5251c92 Add pitchercards and ratings 2023-09-16 00:05:10 -05:00
Cal Corum
22cc01d200 Added battingcards and ratings 2023-09-15 22:38:15 -05:00
Cal Corum
88b723d9f2 Added query_to_csv helper 2023-09-15 00:01:59 -05:00
Cal Corum
4a7a8ad397 Import cleanup 2023-09-14 22:11:31 -05:00
Cal Corum
144ced6875 Added admin, gamerewards, gauntletrewards, gauntletruns, notifications, paperdex 2023-09-14 22:05:51 -05:00
Cal Corum
177ca2c585 Added results, rewards, batstats, and pitstats 2023-09-14 15:48:41 -05:00
Cal Corum
7f008f9d98 Added cards and events 2023-09-13 16:42:14 -05:00
Cal Corum
6325698a10 Added cardsets, packs, packtypes, players 2023-09-13 16:19:56 -05:00
Cal Corum
0872362869 Added teams & rarity 2023-09-13 15:12:44 -05:00
Cal Corum
e7039eb83e Initial Commit with /current 2023-09-13 14:44:26 -05:00