chore: pin all Python dependency versions in requirements.txt (#76)
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m58s

- Pin redis==7.3.0 and move to requirements.txt (production)
- Create requirements-dev.txt with all dev/test deps pinned to exact versions
  (pytest-mock==3.15.1, black==26.1.0, ruff==0.15.0)
- Remove dev/test tools from requirements.txt (not needed in Docker image)
- Document pinning policy and requirements-dev.txt usage in CLAUDE.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Cal Corum 2026-03-10 01:03:27 -05:00
parent 9ba0713887
commit 88edd1fa10
3 changed files with 28 additions and 10 deletions

View File

@ -81,6 +81,23 @@ class MyCog(commands.Cog):
- API errors → verify `DB_URL` points to correct database API and `API_TOKEN` matches - API errors → verify `DB_URL` points to correct database API and `API_TOKEN` matches
- Redis errors are non-fatal (graceful fallback when `REDIS_URL` is empty) - Redis errors are non-fatal (graceful fallback when `REDIS_URL` is empty)
## Dependencies
### Pinning Policy
All dependencies are pinned to exact versions (`==`). This ensures every Docker build
produces an identical image — a `git revert` actually rolls back to the previous working state.
- **`requirements.txt`** — production runtime deps only (used by Dockerfile)
- **`requirements-dev.txt`** — includes `-r requirements.txt` plus dev/test tools
When installing for local development or running tests:
```bash
pip install -r requirements-dev.txt
```
When upgrading a dependency, update BOTH the `==` pin and (if applicable) the comment in
the file. Test before committing. Never use `>=` or `~=` constraints.
## API Reference ## API Reference
- OpenAPI spec: https://sba.manticorum.com/api/openapi.json (use WebFetch for current endpoints) - OpenAPI spec: https://sba.manticorum.com/api/openapi.json (use WebFetch for current endpoints)

9
requirements-dev.txt Normal file
View File

@ -0,0 +1,9 @@
-r requirements.txt
# Development & Testing
pytest==8.4.1
pytest-asyncio==1.0.0
pytest-mock==3.15.1
aioresponses==0.7.8
black==26.1.0
ruff==0.15.0

View File

@ -6,15 +6,7 @@ aiohttp==3.12.13
# Utilities # Utilities
python-dotenv==1.1.1 python-dotenv==1.1.1
redis>=5.0.0 # For optional API response caching (not currently installed) redis==7.3.0
# Development & Testing
pytest==8.4.1
pytest-asyncio==1.0.0
pytest-mock>=3.10.0 # Not currently installed
aioresponses==0.7.8
black>=23.0.0 # Not currently installed
ruff>=0.1.0 # Not currently installed
# Optional Dependencies # Optional Dependencies
pygsheets==2.0.6 # For Google Sheets integration (scorecard submission) pygsheets==2.0.6 # For Google Sheets integration (scorecard submission)