Skip to main content

A logical, reasonably standardized but flexible project structure for doing and sharing scientific research.

Project description

๐Ÿงช Cookiecutter Scientific Research

A standardized, flexible template for scientific research projects

Project Overview โ€ข Features โ€ข Quick Start โ€ข Project Structure โ€ข Development Guide โ€ข Acknowledgements โ€ข License

๐Ÿ“‹ Project Overview

Cookiecutter Scientific Research is a project template generator designed for scientific research projects, aimed at providing a standardized structure and tool configuration to help researchers focus on scientific discovery rather than project setup. Through predefined best practices, this template supports high-quality scientific computing and data analysis workflows, ensuring the reproducibility and reliability of the research process.

โœจ Features

  • Standardized Project Structure - Conforms to best practices for modern scientific computing projects

  • Reproducible Experimental Environment - Built-in environment management and dependency locking mechanisms

  • Integrated Documentation System - Preconfigured MkDocs documentation for showcasing research results

  • Testing and Quality Control - Built-in testing frameworks and code quality tools

  • Modern Package Management - Simplifies dependency management using modern tools like uv/pip

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.9 or higher
  • uv or pipx (recommended for tool installation)

Installation

This project is available on PyPI. As a cross-project tool, we recommend using uv or pipx for installation:

# Install using uv (recommended)
uv tool install cookiecutter-scientific-research

# Or install using pipx
pipx install cookiecutter-scientific-research

Creating a New Project

After installation, simply run the following command and follow the prompts:

ccsr

Initializing the Project Environment

After creating the project, navigate to the project directory and initialize the environment:

cd your-project-name

# Use uv to manage dependencies (recommended)
uv lock
uv sync

๐Ÿ“‚ Project Structure

The generated project follows the directory structure below, with each section having a clear responsibility:

โ”œโ”€โ”€ LICENSE            <- Project license
โ”œโ”€โ”€ Makefile           <- Makefile with common commands
โ”œโ”€โ”€ README.md          <- Project documentation
โ”œโ”€โ”€ pyproject.toml     <- Project configuration and dependency management
โ”‚
โ”œโ”€โ”€ data               <- Data directory
โ”‚   โ”œโ”€โ”€ external       <- Third-party data
โ”‚   โ”œโ”€โ”€ interim        <- Intermediate processed data
โ”‚   โ”œโ”€โ”€ processed      <- Final analysis datasets
โ”‚   โ””โ”€โ”€ raw            <- Original data (read-only)
โ”‚
โ”œโ”€โ”€ {{ cookiecutter.module_name }}  <- Project source code
โ”‚   โ”œโ”€โ”€ __init__.py    <- Package initialization file
โ”‚   โ”œโ”€โ”€ config.py      <- Configuration parameter management
โ”‚   โ”œโ”€โ”€ data           <- Data acquisition and loading
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ dataset.py
โ”‚   โ”œโ”€โ”€ analyze        <- Data analysis module
โ”‚   โ”‚   โ””โ”€โ”€ analysis.py
โ”‚   โ”œโ”€โ”€ training       <- Model training and prediction
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ predict.py <- Model prediction
โ”‚   โ”‚   โ””โ”€โ”€ train.py   <- Model training
โ”‚   โ”œโ”€โ”€ models         <- Model definitions
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ model.py   <- Model architecture
โ”‚   โ”œโ”€โ”€ features        <- Feature engineering
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ features.py
โ”‚   โ”œโ”€โ”€ visualization   <- Data visualization
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ plot.py 
โ”‚   โ””โ”€โ”€ utils          <- Utility functions
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ tools.py   <- General utilities
โ”‚
โ”œโ”€โ”€ notebooks          <- Jupyter/Marimo notebooks
โ”‚                         (Naming convention: number-creator-description)
โ”‚
โ”œโ”€โ”€ docs               <- Project documentation (MkDocs)
โ”‚
โ”œโ”€โ”€ references         <- Reference materials and literature
โ”‚
โ”œโ”€โ”€ reports            <- Analysis reports and results
โ”‚   โ”œโ”€โ”€ figures        <- Generated charts
โ”‚   โ””โ”€โ”€ logs           <- Experiment logs
โ”‚
โ””โ”€โ”€ tests              <- Test directory

๐Ÿ”ง Development Guide

Package Management and Building

This project uses flit_core as the build backend, supporting modern Python package management. To build distribution packages:

# Install build dependencies
uv lock
# Install all optional dependencies
uv sync --all-extras
# Or install specific dependency groups
uv sync -e dev    # Development dependencies
uv sync -e test   # Testing dependencies
uv sync -e docs   # Documentation dependencies

# Build distribution packages
uv build

The built wheel files and source distribution packages will be saved in the dist/ directory.

Project Customization

During the template generation process, you can customize various aspects of the project according to prompts:

  • Project name and module name
  • Author information
  • License type
  • Dependency management method
  • Test framework selection
  • And more

๐Ÿ™ Acknowledgements

This project is modified from cookiecutter-data-science, special thanks to the DrivenData team for providing the excellent template and inspiration. The project has been customized for scientific research scenarios on the original basis, including tool chain optimization, workflow adjustments, and documentation structure optimization.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

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

cookiecutter_scientific_research-1.0.5.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file cookiecutter_scientific_research-1.0.5.tar.gz.

File metadata

  • Download URL: cookiecutter_scientific_research-1.0.5.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cookiecutter_scientific_research-1.0.5.tar.gz
Algorithm Hash digest
SHA256 133b102668944828b38d87ab4bf980f41f6a99239588c2d85ecc6891480c37d4
MD5 7d54422bfa809659c8ae8512845a657f
BLAKE2b-256 7d329efbe7b7c3ddffc59d9b3524d7704963325363d583bff9c248ef2fa5f3a3

See more details on using hashes here.

File details

Details for the file cookiecutter_scientific_research-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: cookiecutter_scientific_research-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cookiecutter_scientific_research-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7d65ed61533e2ef90fe277614965f10e6a81574db248c1af1747739b1fb1169d
MD5 b156ec6f5e85b959700c66379c7e347d
BLAKE2b-256 e3c66baf7b68c8967d086cd8d388bc55f489c7de89abbf4c31994dc5ed641099

See more details on using hashes here.

Supported by

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