- Pin all direct dependencies to exact versions captured from production
via `docker exec sba_db_api pip freeze`
- Explicitly pin starlette==0.52.1 (root cause of 2026-03-09 outage)
- Move pytest/pytest-asyncio to new requirements-dev.txt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 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
- /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>