In this article, we will show how one can create his own cookiecutter template to start several data science projects in the same style. This structure will help you, especially if you work in a team. Here we will create a minimal setup; you can fork the repo and configure it to your own style by e.g., adding more folders or subdirectories.

Motivation

Disclaimer: The cookiecutter template we will create in the following is inspired by the incredible **Cookiecutter Data Science** Project**.** Here we will create a lighter cookie that uses poetry as dependency and virtual environment management.

You can find this cookiecutter for Data Science projects on GitHub. Feel free to fork and Star it!

Such a cookiecutter enables you to create multiple projects in the same style. So you have minimal effort to start a new project. If you work in a team, this kind of structure helps to standardize projects. If a colleague goes on vacation, you can substitute for him without much effort.

1) poetry new - create an empty package

For our cookie, we want to use poetry to manage our environment. Furthermore, with poetry, we can package our source code and make it installable in other projects. This helps you reuse code that you are writing on the way. For example, you could use tested modules later in the production application.

Why would we use poetry?

To kickstart a new python project containing an src folder, you can use

poetry new --src <packagename>

This command creates the following structure:

<packagename>              <- according to [PEP8](<https://peps.python.org/pep-0008/#package-and-module-names>) only use all-lowercase names
├── pyproject.toml         <- [file containing](<https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/>) package configurations
├── README.md              <- Readme file containing general project info
├── src                    <- src folder containing the code (.py-files)
│   └── <packagename>      
│       └── __init__.py    
└── tests                  <- folder for test files 
    └── __init__.py        

This now created our

2) Create a cookiecutter structure around the empty package

Wip: stay tuned!