A professional, reproducible Python image processing pipeline with robust RAW support, modern development workflow, and built-in CI/CD, linting, type checking, and security.
- Image Processing: RAW, JPEG, and other formats using Pillow, OpenCV, and RawPy
- Modern Python Tooling:
- Linting & formatting: Ruff
- Type checking: mypy
- Security: bandit, safety
- Testing: pytest, pytest-cov
- Pre-commit hooks: pre-commit
- CI/CD: Automated with GitHub Actions (multi-version, coverage, security, artifact upload)
- Reproducible Environments: All dependencies pinned in pyproject.toml, managed with uv
- Clean Project Structure:
- Source: src
- Tests: tests
- Docs: docs
- All config in pyproject.toml
git clone <your-repo-url>
cd photo-post-processing
uv sync --all-extrasuv run pre-commit installuv run python src/process_photos.py- Lint:
uv run ruff check src tests - Format:
uv run ruff format src tests - Type Check:
uv run mypy src - Test:
uv run pytest - Test with Coverage:
uv run pytest --cov=src --cov-report=term-missing - Security:
uv run bandit -r src/ -c .bandit -f json -o bandit-report.jsonuv run safety check --output json > safety-report.json - Pre-commit (all files):
uv run pre-commit run --all-files
Or use the provided Makefile for common tasks:
make lint
make format
make test
make run
make test-cov
make setup-dev
make clean- GitHub Actions runs on every push and PR:
- Lint, format, type check, test (with coverage)
- Security checks (bandit, safety)
- Uploads coverage and security reports as artifacts
src/ # Main source code
tests/ # All tests and fixtures
docs/ # Documentation and guides
pyproject.toml # All dependencies and tool config
.pre-commit-config.yaml
Makefile
.github/workflows/ # CI/CD pipeline
All dependencies are pinned for reproducibility. See pyproject.toml for exact versions.
- Core: pillow, opencv-python, rawpy, numpy, tqdm, colorama, psutil
- Dev: pytest, pytest-cov, ruff, mypy, pre-commit, bandit, safety
- Fork and clone the repo
- Install dev dependencies:
uv sync --all-extras - Set up pre-commit:
uv run pre-commit install - Use the
uvcommands above for linting, testing, etc.- (Optional) If you have
makeinstalled, you can use the provided Makefile for common tasks.
- (Optional) If you have
- Open a PR with your changes
MIT