Major Domo v2 - Discord bot for Strat-o-Matic Baseball Association
Go to file
Cal Corum 2926664d2d CLAUDE: Remove constants.py and migrate to config-based constants
Eliminates redundant constants.py file by moving all constants to config.py.
All constants (except baseball positions) are now accessible via get_config().

Changes:
- config.py: Added baseball position sets as module-level constants
  * PITCHER_POSITIONS, POSITION_FIELDERS, ALL_POSITIONS remain static
  * All other constants now accessed via BotConfig instance

- constants.py: Deleted (redundant with config.py)

- Updated 27 files to use get_config() instead of constants module:
  * Commands: admin, help, league (3), players, profile, teams (3),
    transactions (3), utilities, voice
  * Services: league, player, team, trade_builder, transaction_builder
  * Utils: autocomplete, team_utils
  * Views: embeds
  * Tests: test_constants, test_services (3 files)
  * Examples: enhanced_player, migration_example

- tests/test_constants.py: Rewritten to test config values
  * All 14 tests pass
  * Now validates BotConfig defaults instead of constants module

Import Changes:
- Old: `from constants import SBA_CURRENT_SEASON`
- New: `from config import get_config` → `get_config().sba_current_season`
- Positions: `from config import PITCHER_POSITIONS, ALL_POSITIONS`

Benefits:
- Single source of truth (config.py only)
- Cleaner architecture - no redundant wrapper
- All constants configurable via environment variables
- Reduced maintenance overhead
- Type safety with Pydantic validation

All configuration tests pass. Core refactoring complete.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-16 10:52:05 -05:00
.vscode CLAUDE: Convert constants to configurable environment variables 2025-10-16 10:40:22 -05:00
api CLAUDE: Fix /set-image command to use query parameters for API updates 2025-10-13 17:52:14 -05:00
commands CLAUDE: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -05:00
models CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
services CLAUDE: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -05:00
tasks CLAUDE: Comprehensive bot improvements and test infrastructure 2025-10-02 11:35:26 -05:00
tests CLAUDE: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -05:00
utils CLAUDE: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -05:00
views CLAUDE: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -05:00
.dockerignore CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
.gitignore CLAUDE: Convert constants to configurable environment variables 2025-10-16 10:40:22 -05:00
bot.py CLAUDE: Implement soak easter egg with disappointment GIFs and tracking 2025-10-13 23:25:22 -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
COMMAND_LIST.md CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
config.py CLAUDE: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -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
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: Remove constants.py and migrate to config-based constants 2025-10-16 10:52:05 -05:00