This repository eases the creation of a new Python package. Using cookiecutter
, it will copy the project template and personalize it according to the answers to a few questions (e.g. the project name) so that you can get started quickly.
All the requirements and features are described in the documentation.
- Easy dependency management with
Poetry
. - Pretty documentation with
Mkdocs material
. - Package installable on any local environment (package structure).
- Deployment on
PyPI
in a few seconds, if needed. - Tests with
pytest
. - Formatting with
black
. - Standardized project organization (
data
folder,config
folder, ...).
First, ensure you have Python installed (version >= 3.7
) and Git. Next, install PyPoetry
and cookiecutter
(if not done yet):
The official installer can be found below (for Linux, macOS, or Windows WSL users):
curl -sSL https://install.python-poetry.org | python3 -
If you use Windows without WSL, or if the above command line was not working, choose another installer (see their documentation).
Install cookiecutter
using one of the following command lines:
pip install cookiecutter # install with pip
conda install cookiecutter # install with conda
Run the following command line to create a new project folder:
cookiecutter gh:MICS-Lab/poetry_cookiecutter
After answering a few questions, it creates a new folder with everything you need inside.