Pipenv Pytest Example
Python project example with Pipenv, Pytest, pre-commit hooks, CI/CD with GitHub Actions, and badge generation.
What it is
A Python project example with Pipenv for dependency management, Pytest for testing, pre-commit hooks for code quality, CI/CD with GitHub Actions, and automated coverage badge generation.
Available as source code.
Technical stack
- Pipenv: dependency management and virtual environments with
PipfileandPipfile.lock - Pytest: testing framework with fixtures, parametrize, and plugins
- Pre-commit: hooks that run linters and formatters before each commit
- GitHub Actions: CI pipeline that runs tests and generates coverage badges
- Coverage.py: code coverage measurement with badge reporting
Lessons learned
The Pipenv + Pytest combination offers a clean workflow for Python projects. Pre-commit hooks catch errors before they reach CI, reducing the feedback cycle.
References
- GitHub Repository — jonmatum, 2024. Source code and configuration.
Related content
- DevOps Practices
Set of technical and cultural practices that implement DevOps principles — from Infrastructure as Code to blameless post-mortems. The "how" behind the philosophy.
- Testing Strategies
Approaches and testing levels for validating software works correctly, from unit tests to end-to-end tests and testing in production.