Major Domo Legacy - Original Discord bot implementation
Go to file
Cal Corum cd8cf0aee8 Add salary cap helper functions and unit tests
- Add DEFAULT_SALARY_CAP (32.0) and SALARY_CAP_TOLERANCE (0.001) constants
- Add get_team_salary_cap() for retrieving team cap with fallback
- Add exceeds_salary_cap() for centralized cap validation
- Add 17 unit tests covering all edge cases
- Update refactor plan marking P1 tasks complete

These helpers will be used by P2 tasks to replace hardcoded 32.0/32.001
values in draft.py and transactions.py

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 17:09:25 -06:00
.vscode DraftPick, Player, Team, and DraftData dataclasses added along with tests 2025-06-07 23:49:13 -05:00
api_calls Add salary_cap field to Team model 2025-12-09 16:53:27 -06:00
cogs Reapply bug fixes to branch 2025-09-20 11:02:05 -05:00
tests Add salary cap helper functions and unit tests 2025-12-09 17:09:25 -06:00
.gitignore Post Draft fixes for season 12 2025-07-12 23:15:00 -05:00
db_calls_gameday.py Migrated to rotating log handler 2024-12-11 14:52:28 -06:00
db_calls_gameplay.py Migrated to rotating log handler 2024-12-11 14:52:28 -06:00
db_calls.py Post Draft fixes for season 12 2025-07-12 23:15:00 -05:00
Dockerfile Parameterize DB location 2025-06-07 23:47:22 -05:00
exceptions.py Parameterize DB location 2025-06-07 23:47:22 -05:00
gameplay_helpers.py Initial commit 2023-02-19 21:22:57 -06:00
helpers.py Add salary cap helper functions and unit tests 2025-12-09 17:09:25 -06:00
LICENSE Initial commit 2023-02-19 20:55:37 -06:00
majordomo.py Migrated to rotating log handler 2024-12-11 14:52:28 -06:00
pytest.ini DraftPick, Player, Team, and DraftData dataclasses added along with tests 2025-06-07 23:49:13 -05:00
requirements.txt Update discord requirement to PyPi 2023-02-26 18:13:14 -06:00
salary_cap_refactor_plan.json Add salary cap helper functions and unit tests 2025-12-09 17:09:25 -06:00