A template repo for container-ized Python applications.
This template includes pre-commit hooks for code quality and security checks. To set up the development environment:
-
Install development dependencies:
make development-requirements
-
Install pre-commit hooks:
make pre-commit-install
-
Run pre-commit on all files (optional):
make pre-commit-run
The following hooks are configured to run automatically on commit:
- Black: Code formatting with consistent style
- isort: Import sorting and organization
- flake8: Linting for code quality
- bandit: Security vulnerability scanning
- detect-secrets: Secret detection in code
- Various checks includings:
- Merge conflict detection
- YAML/JSON validation
- Large file detection
- Trailing whitespace removal
- End-of-file fixes
make development-requirements
- Install development dependenciesmake pre-commit-install
- Install pre-commit hooksmake pre-commit-run
- Run pre-commit on all filesmake pre-commit-clean
- Remove pre-commit hooksmake lint
- Run linting tools manuallymake fmt
- Format code with black and isort