# 1. Install development environment
make install-dev
# 2. Verify everything works
make help# Auto-fix common errors
make fix-all
# Verify everything is good (like in GitHub Actions)
make check-ci# Formatting and automatic fixes
make format # Format code with black + isort
make fix-all # Fix imports, whitespace, and formatting
make fix-imports # Only remove unused imports
make fix-whitespace # Only fix whitespace
# Quick checks
make quick-lint # Quick check with flake8
make lint # All linting checks
make check-ci # Simulate GitHub Actions exactly
# Testing
make test # Run all tests
make test-coverage # Tests with coverage report
make test-sync # Only sync module tests
# Dependency management
make sync-deps # Sync dependencies with UV
make deps-update # Update all dependenciesAfter setting up this environment, we have significantly reduced linting errors:
- Unused imports: Removed with
autoflake - Formatting: Fixed with
blackandisort - Trailing whitespace: Removed with
sed - Line spacing: Fixed with
black
- Lines too long (E501): ~15 cases
- Unnecessary f-strings (F541): ~12 cases
- Bare except (E722): 2 cases
- Comparisons with True/False (E712): ~6 cases
- Unused variables (F841): 1 case
- Imports in wrong place (E402): ~4 cases
- Undefined variables (F821): 3 cases in tests
make format && make test-sync # Format and test changesmake fix-all && make check-ci # Auto-fix and verify everythingmake all # Complete flow: clean + install + format + lint + testmake check-ci # Replicate exactly what GitHub Actions does- black: Code formatting
- isort: Import sorting
- flake8: Basic linting
- mypy: Type checking
- ruff: Advanced linting
- autoflake: Unused import removal
- pytest: Testing framework
- pytest-cov: Coverage reporting
All tools are configured in pyproject.toml:
- black: 88 characters per line
- isort: Compatible with black
- flake8: Ignores E203,W503 (conflicts with black)
- mypy: Ignores missing imports
- pytest: Auto-discovery of tests
- Use
make helpto see all available commands make fix-allsolves most problems automaticallymake check-citells you exactly what will fail in GitHub Actions- Remaining errors are mainly cosmetic and can be fixed gradually
- UV handles everything: No need to install dependencies manually
| Local Command | GitHub Actions |
|---|---|
make check-ci |
Complete checks |
make format |
Auto-formatting |
make lint |
Complete linting |
make test |
Testing |
Now you have complete parity between your local environment and CI/CD! 🎉