1.1 KiB
1.1 KiB
Development Scripts
clean_cache.sh
Clean all Python cache files:
bash scripts/clean_cache.sh
Removes:
__pycache__/directories*.pyc,*.pyofiles.pytest_cache/.mypy_cache/.ruff_cache/.coveragehtmlcov/
update_readme.py
Update README.md with latest project information:
uv run python scripts/update_readme.py
Check if update needed (for CI):
uv run python scripts/update_readme.py --check
post-commit
Git hook for auto-updating README after commits.
Install:
cp scripts/post-commit .git/hooks/post-commit
chmod +x .git/hooks/post-commit
Disable Python Cache During Development
Set environment variables before running Python:
# Option 1: Export variables
export PYTHONDONTWRITEBYTECODE=1
export UV_NO_CACHE=1
# Option 2: Use with command
PYTHONDONTWRITEBYTECODE=1 uv run python -m app.main
# Option 3: Add to .env (not committed)
echo "PYTHONDONTWRITEBYTECODE=1" >> .env
Or use the clean script periodically:
bash scripts/clean_cache.sh