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:
- uv for dependency management
- Code quality with ruff
- Testing with pytest
- Ready to run Jupyter notebooks
- The canonical set of Python data science packages: pandas, matplotlib, scikit-learn
First you need to install uv and cookiecutter:
$ pip install pipx
$ pipx install uv cookiecutter
$ brew install uv 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 data
repository 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>
$ uv sync
You are now ready to start developing. To create your first jupyter notebooks just do
$ uv run jupyter lab
That's all Folks! For more information also have a look at the README.md
created for your project.
This project is inspired by