Note: This template uses poetry and python 3.9+
This repository is a cookiecutter template for a data science project.
poetry dependency management.
cookiecutter for new project generation based on the template directory.
Once the project is generated based on the template, you will get out-of-the-box support for:
- Dependency management using
poetry. - Linting and formatting done via
ruff. - Helper development tasks (lint, format, test, etc) run via
Makefile(runmake helpto see the available tasks). - Pre-commit hooks using
pre-commitpackage and plugins to automate code quality aspects.
You first need to have cookiecutter available in your machine. There are several alternatives to this. Here are 2:
Installation via homebrew (for MacOs users): brew install cookiecutter
brew install cookiecutterOr, create a python environment with cookiecutter in it. Assuming you have a workspace directory in you USER HOME,
you can then add the cookiecutter environment into it like so:
python -m venv ~/workspace/cookiecutter
source ~/workspace/cookiecutter/bin/activate
python -m pip install -U pip cookiecutter Reminder: if you opted for the python environment approach, you will only be able to use
cookiecutteras a command if you activate the environment.
Now you are ready to create a new project from the template, using the cookiecutter utility:
cookiecutter https://github.com:jmetzz/data-science-templateThis will use the latest version in the main file. To generate a project from a different version,
use the -c, --checkout <checkout> option. See details at
Cookiecutter Command Line Options.
Enter in your new project directory, install the dependencies and create the first commit:
cd <your-project-directory>
make deps license
make lint test
git add .
git commit -m "Initial commit"Enjoy your new project.