Major Domo v2 - Discord bot for Strat-o-Matic Baseball Association
Go to file
Cal Corum ea7b356db9 CLAUDE: Refactor draft system to eliminate hard-coded magic numbers
Replace all hard-coded values with centralized config constants for better
maintainability and flexibility:

Added config constants:
- draft_team_count (16)
- draft_linear_rounds (10)
- swar_cap_limit (32.00)
- cap_player_count (26)
- draft_total_picks property (derived: rounds × teams)

Critical fixes:
- FA team ID (498) now uses config.free_agent_team_id in:
  * tasks/draft_monitor.py - Auto-draft validation
  * commands/draft/picks.py - Pick validation and autocomplete
- sWAR cap limit display now uses config.swar_cap_limit

Refactored modules:
- utils/draft_helpers.py - All calculation functions
- services/draft_service.py - Pick advancement logic
- views/draft_views.py - Display formatting

Benefits:
- Eliminates risk of silent failures from hard-coded IDs
- Centralizes all draft constants in one location
- Enables easy draft format changes via config
- Improves testability with mockable config
- Zero breaking changes - fully backwards compatible

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 22:14:17 -05:00
.gitlab CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
.vscode CLAUDE: Convert constants to configurable environment variables 2025-10-16 10:40:22 -05:00
api CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
commands CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
models Refactor x-check chart data 2025-10-22 20:41:21 -05:00
services CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
tasks CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
tests CLAUDE: Refactor voice cleanup service to use @tasks.loop pattern 2025-10-24 00:05:35 -05:00
utils CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
views CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
.dockerignore Add debug directory to .gitignore and .dockerignore 2025-10-24 00:06:34 -05:00
.gitignore Draft pick service and draft helpers 2025-10-24 10:24:14 -05:00
.gitlab-ci.yml CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
.mcp.json CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
bot.py CLAUDE: Refactor voice cleanup service to use @tasks.loop pattern 2025-10-24 00:05:35 -05:00
BUILD_AND_PUSH.md CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
build-and-push.sh CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
CLAUDE.md CLAUDE: Add comprehensive CLAUDE.md documentation files for AI agent guidance 2025-10-20 20:30:07 -05:00
COMMAND_LIST.md CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
config.py CLAUDE: Refactor draft system to eliminate hard-coded magic numbers 2025-10-24 22:14:17 -05:00
docker-compose.dev.yml CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
docker-compose.yml CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
DOCKER.md CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
Dockerfile CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
Dockerfile.versioned CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
exceptions.py CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
PRE_LAUNCH_ROADMAP.md CLAUDE: Reorganize data storage and enhance team/roster displays 2025-10-15 19:05:51 -05:00
pyrightconfig.json CLAUDE: Convert constants to configurable environment variables 2025-10-16 10:40:22 -05:00
requirements.txt CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
test_real_data.py CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00