Commit Graph

3 Commits

Author SHA1 Message Date
Cal Corum
c75e2781be fix: address review feedback (#187)
- Move lazy imports to top level in card_storage.py and players.py (CLAUDE.md violation)
- Use os.environ.get() for S3_BUCKET/S3_REGION to allow dev/prod bucket separation
- Fix test patch targets from app.db_engine to app.services.card_storage (required after top-level import move)
- Fix assert_called_once_with field name: MockBatting.player → MockBatting.player_id

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 20:03:02 -05:00
Cal Corum
f4a90da629 fix: review feedback — pin boto3, use player_id consistently, add comment
- Pin boto3==1.42.65 to match project convention of exact version pins
- Use player_id (not player) for FK column access in card_storage.py
  to match the pattern used throughout the codebase
- Add comment explaining the tier is None guard in S3 upload scheduling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:36:20 +00:00
Cal Corum
534d50f1a8 feat: add card_storage S3 upload utility for variant cards
New service with S3 upload functions for the refractor card art
pipeline. backfill_variant_image_url reads rendered PNGs from disk,
uploads to S3, and sets image_url on BattingCard/PitchingCard rows.
18 tests covering key construction, URL formatting, upload params,
and error swallowing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:36:20 +00:00