|
| 1 | +# Modern Python Boilerplate |
| 2 | +This is my modern python boilerplate. The goal is to provide a good starting point to develop new python project with most up-to-date tooling, structure and good practices. |
| 3 | + |
| 4 | +# Features |
| 5 | +A global `Makefile` to run all the commands. You can run `make help` to see all the available commands. |
| 6 | + |
| 7 | +- **Python Management** |
| 8 | + - UV for python version management `.python-version` |
| 9 | + - UV for dependency management `pyproject.toml` |
| 10 | + - src/package structure |
| 11 | + - Usage of Project Script to directly call the package like `$ modern_python_boilerplate` |
| 12 | +- **Continuous Integration `make allci`** |
| 13 | + - Ruff for linting `make check` |
| 14 | + - Ruff for formatting `make format` |
| 15 | + - Ty for type checking `make type` |
| 16 | + - Pytest for testing `make test` |
| 17 | + - Pytest-cov for testing coverage `make cov` |
| 18 | + - Pre-commit hooks to make some checks and formatting code before commits `make commit` |
| 19 | +- **Documentation** |
| 20 | + - Mkdocs for documentation building with Markdown `make doc` |
| 21 | + - Automatic build of the API Reference page |
| 22 | + - Pre-configured GitHub Action / Gitlab CI for publishing the documentation on Github pages / Gitlab pages |
| 23 | +- **Running, Publishing and Deploying** |
| 24 | + - Build the pacakge with UV `make build` |
| 25 | + - Publish to PyPi with Twine `make publish` |
| 26 | + - Dockerfile to run in a container `make dockerbuild` and `make dockerrun` |
| 27 | + - DevContainer pre-configured. `.devcontainer/devcontainer.json` |
| 28 | + |
| 29 | +# How to use |
| 30 | +1. Delete this README.md to replace by you package one. |
| 31 | +2. Replace all occurrence of `modern_python_boilerplate` and `modern-python-boilerplate` and `ModernPythonBoilerplate` by your pacakge name. Including folder names in src/. |
| 32 | +3. Get familiar with `make help`, it will show you all the available commands. |
| 33 | + |
| 34 | +*** |
| 35 | + |
| 36 | +## Readme Sample for your pacakge |
| 37 | + |
| 38 | +# MyPackage |
| 39 | +This is my package. It does some cool stuff. |
| 40 | + |
| 41 | +## Installation |
| 42 | +From PyPi: `pip install my_package` |
| 43 | +From source: `pip install -e .` |
| 44 | + |
| 45 | +## Usage |
| 46 | +Example 1: `my_package --help` |
| 47 | + |
| 48 | +## Contact |
| 49 | +Creator and Maintainer: [**Corentin Meyer **, PhD in Biomedical AI ](https://cmeyer.fr) <[email protected]> |
0 commit comments