Skip to content

Cookiecutter template to initiate a minimal Python data science project

Notifications You must be signed in to change notification settings

asmaier/cookiecutter-ds-mini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cookiecutter DS Mini

This is a Cookiecutter template that can be used to initiate a minimal Python data science project with a minimal set of tools for development and testing. It supports the following features:

Quickstart

First you need to install poetry and cookiecutter:

Linux, Windows

$ pip install pipx
$ pipx install poetry cookiecutter

Homebrew on Mac OS X

$ brew install poetry cookiecutter

Then navigate to the directory in which you want to create a project directory, and run the following commands

$ cookiecutter https://github.com/asmaier/cookiecutter-ds-mini.git

Afterwards your project directory is ready. It will have the following structure

{{ cookiecutter.project_name }}/
├── README.md
├── data
│   └── iris.csv
├── notebooks
│   └── example.ipynb
├── pyproject.toml
├── src
│   └── {{ cookiecutter.project_slug }}
│       ├── resources
│       │   └── .gitkeep
│       ├── __init__.py
│       └── utils.py
└── tests
    ├── resources
    │   └── .gitkeep
    └── test_utils.py

The datarepository is meant for all kinds of data which you might analyse or explore with jupyter notebooks in the notebooks directory. The code for your python package goes into the src/{{ cookiecutter.project_slug }} directory. The tests for your code go into the tests directory. Your package and test repository hold a resources directory which is meant for static resources like images, test files, ... which your package or tests might need.

Just change into the newly created directory and install the dependencies

$ cd <project_name>
$ poetry install

You are now ready to start developing. To create your first jupyter notebooks just do

$ poetry run jupyter lab

That's all Folks! For more information also have a look at the README.md created for your project.

Acknowledgements

This project is inspired by