Skip to main content

No project description provided

Project description

Ruff Code style: black

License: MIT

Table of Contents

๐Ÿช Data Science Cookiecutter

The Data Science Cookiecutter ๐Ÿช is an opinionated, yet configurable, Python project that provides a template for organizing and setting up data science projects. It uses the Cookiecutter project structure to create a standardized and reproducible project layout.

๐ŸŽฏ Motivation

Data science projects often require a well-structured project layout to ensure reproducibility and collaboration. The Data Science Cookiecutter aims to solve this problem by providing a project template. While it follows certain opinions about project organization, it also allows for easy customization to fit different project needs.

โœจ Features

  • Standardized project structure for data science projects
  • Automatic generation of project files and folders
  • Customizable templates for different project needs
  • Customizable for multiple programming languages (currently, the default template currently only has Python)
  • Easy project initialization with just a few command-line arguments

โš™๏ธ Installation

The Data Science Cookiecutter is on pypi and can be installed using pip, poetry, pdm or conda.

pdm install datascience-cookiecutter

๐Ÿš€ Basic Usage

To create a new data science project using the Data Science Cookiecutter, follow these steps:

  1. Open a terminal or command prompt.
  2. cd to the directory where you want to create the project.
  3. Run the following command: cookiecutter myproject where myproject is the name of your project.
  4. profit ๐ŸŽ‰

๐Ÿ“ Default Template

.
โ”œโ”€โ”€ Makefile         <- Makefile for project automation
โ”œโ”€โ”€ README.md        <- Project documentation and instructions
โ”œโ”€โ”€ pyproject.toml   <- Configuration file for dependencies and project metadata
โ”œโ”€โ”€ data             <- Folder to store data
โ”‚   โ”œโ”€โ”€ final        <- Folder for final processed data
โ”‚   โ”œโ”€โ”€ processed    <- Folder for intermediate processed data
โ”‚   โ”œโ”€โ”€ raw          <- Folder for raw data
โ”‚   โ””โ”€โ”€ sim          <- Folder for simulated data
โ”œโ”€โ”€ dev              <- Folder for development-related files
โ”‚   โ”œโ”€โ”€ notebooks    <- Folder for Jupyter notebooks
โ”‚   โ””โ”€โ”€ scripts      <- Folder for development scripts
โ”œโ”€โ”€ docs             <- Folder for project documentation
โ”œโ”€โ”€ myproject        <- Placeholder folder for the project itself (replaced with your project name)
โ”‚   โ”œโ”€โ”€ __init__.py  <- Python package initialization file
โ”‚   โ””โ”€โ”€ main.py      <- Main Python script for the project
โ”œโ”€โ”€ references       <- Folder for reference materials
โ”œโ”€โ”€ reports          <- Folder for project reports
โ”‚   โ”œโ”€โ”€ img          <- Folder for images and visualizations used in reports
โ”‚   โ””โ”€โ”€ report.md    <- Sample report file (Markdown format)
โ””โ”€โ”€ tests            <- Folder for project tests

๐Ÿ› ๏ธ Makefile

Makefile A Makefile is a file containing a set of instructions, known as targets, used to automate tasks in software development. It provides a convenient way to define and organize common commands for building, testing, and managing a project.

In the provided Makefile, you have the following targets:

  • install: Installs project dependencies using pdm install.
  • test: Runs project tests with pytest
  • format: Applies code formatting using isort and black.
  • lint: Performs linting and static type checking using ruff and mypy

To use the Makefile, open a terminal or command prompt, navigate to your project directory, and run the desired target using the make command followed by the target name. For example:

make install

โค๏ธ PDM

PDM is a Python package manager and build tool that provides an alternative to other package managers like pip or Poetry. It aims to simplify and enhance the management of project dependencies, virtual environments, and building distributions. Follow the link to install it. If you dont want to use it, you can customize the template to create your own Makefile and pyproject.toml.

The template (and PDM) follow the PEP 621 standard for project metadata to use a pyproject.toml file instead of setup.py. This file contains the project metadata and dependencies. It also allows you to specify details like the Python version and the project entry point.

๐Ÿ”ฌ pytest

Pytest is a Python testing framework that allows you to write simple and scalable tests with a clean and expressive syntax. It provides powerful features like fixtures, test discovery, and test selection.

For more information, you can visit the official pytest website: pytest.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datascience_cookiecutter-0.3.2.tar.gz (9.3 kB view hashes)

Uploaded Source

Built Distribution

datascience_cookiecutter-0.3.2-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page