Commit Graph

7 Commits

Author SHA1 Message Date
root
e5452cf0bf refactor: Add dependency injection for testability
- Created ServiceConfig for dependency configuration
- Created Abstract interfaces (Protocols) for mocking
- Created MockPlayerRepository, MockTeamRepository, MockCacheService
- Refactored BaseService and PlayerService to accept injectable dependencies
- Added pytest configuration and unit tests
- Tests can run without real database (uses mocks)

Benefits:
- Unit tests run in seconds without DB
- Easy to swap implementations
- Clear separation of concerns
2026-02-03 15:59:04 +00:00
Cal Corum
6ff7ac1f62 Add all-season player search endpoint
- /api/v3/players/search now supports season=0 or omitting season to search ALL seasons
- Results ordered by most recent season first
- Added all_seasons field in response to indicate search mode
- Added numpy<2.0.0 constraint for server compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-23 14:26:16 -06:00
Cal Corum
a540a3e7f3 Add Redis Caching 2025-08-27 22:49:37 -05:00
Cal Corum
2c3835c8ac Added SeasonPitchingStats 2025-08-26 00:17:57 -05:00
Cal Corum
79a559088a CLAUDE: Phase 1 PostgreSQL migration fixes complete
- Fixed 4 critical schema issues blocking migration
- Resolved integer overflow by converting Discord IDs to strings
- Fixed VARCHAR length limits for Google Photos URLs
- Made injury_count field nullable for NULL values
- Successfully migrating 7/30 tables (5,432+ records)

Issues resolved:
- CONSTRAINT-CURRENT-INJURY_COUNT-001: Made nullable
- DATA_QUALITY-PLAYER-NAME-001: Increased VARCHAR limits to 1000
- MIGRATION_LOGIC-TEAM-INTEGER-001: Discord IDs now strings
- MIGRATION_LOGIC-DRAFTDATA-INTEGER-001: Channel IDs now strings

New issues discovered for Phase 2:
- CONSTRAINT-CURRENT-BSTATCOUNT-001: NULL stats count
- CONSTRAINT-TEAM-AUTO_DRAFT-001: NULL auto draft flag

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-18 18:09:45 -05:00
Cal Corum
7ac8b752ec Initial commit
File structure in place
/players and /current built
2023-03-21 16:09:46 -05:00
Cal Corum
0ace71fbee
Initial commit 2023-02-19 21:43:17 -06:00