PQAP Quality Checklist
Before Making Changes
- [ ] Understand the current state (what exists, what works)
- [ ] Identify all systems affected by the change
- [ ] Verify infrastructure exists before configuring deployments to it
Before Committing
- [ ] Run linter:
./venv/bin/ruff check . --fix && ./venv/bin/ruff format . - [ ] Run tests:
PYTHONPATH=./src ./venv/bin/python -m pytest tests/ -v --tb=short - [ ] Verify no new warnings or errors introduced
Before Pushing
- [ ] Review all changed files:
git diff --stat - [ ] Ensure commit message accurately describes changes
- [ ] Consider: "Will CI pass after this push?"
Before Deploying
- [ ] Verify target environment exists and is accessible
- [ ] Verify DNS resolves correctly
- [ ] Verify secrets are configured in GitHub
- [ ] Test locally with target environment config
After Pushing
- [ ] Monitor CI pipeline:
gh run list --limit 1 - [ ] If CI fails, fix immediately before any other work
- [ ] Verify deployment succeeded (if auto-deploy enabled)
Infrastructure Changes Checklist
Before configuring deployment to a new environment: - [ ] Server/instance exists and is running - [ ] DNS record exists and resolves - [ ] SSL certificate exists (if HTTPS) - [ ] SSH access is configured - [ ] Service user and directories exist - [ ] Required secrets are set in GitHub
Quick Reference Commands
# Lint and format
./venv/bin/ruff check . --fix && ./venv/bin/ruff format .
# Run all tests
PYTHONPATH=./src ./venv/bin/python -m pytest tests/ -v --tb=short
# Run unit tests only (faster)
PYTHONPATH=./src ./venv/bin/python -m pytest tests/unit/ -v --tb=short
# Check CI status
gh run list --limit 5
# View recent CI failure
gh run view --log-failed
Common Issues and Fixes
| Issue | Fix |
|---|---|
E722 bare except |
Use except Exception: instead of except: |
F841 unused variable |
Remove or prefix with _ |
E402 import not at top |
Add # noqa: E402 if intentional (e.g., after load_dotenv) |
F401 unused import |
Remove or add to __all__ for re-exports |