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
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ analysis.py
โ”‚   โ”œโ”€โ”€ features       <- Feature engineering
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ features.py
โ”‚   โ”œโ”€โ”€ models         <- Model definitions
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ model.py
โ”‚   โ”œโ”€โ”€ training       <- Model training and prediction
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ train.py
โ”‚   โ”‚   โ””โ”€โ”€ predict.py
โ”‚   โ”œโ”€โ”€ visualization  <- Data visualization
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ””โ”€โ”€ plots.py
โ”‚   โ””โ”€โ”€ utils          <- Utility functions
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ tools.py
โ”‚
โ”œโ”€โ”€ 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.2.0.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.2.0.tar.gz.

File metadata

  • Download URL: cookiecutter_scientific_research-1.2.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"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.2.0.tar.gz
Algorithm Hash digest
SHA256 2ab0e3f92e1c1ffa3bff231d472ce1a2cbdf939c68eec3aae6670263a65fa3bd
MD5 0e2bce38ac5d524072dad291bf72ee10
BLAKE2b-256 2e48cefdf559b9ae76d7a36ef0f2d6a812e0a0e375a6befda5a4e740b470c6d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cookiecutter_scientific_research-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 403a6263c453b46e58cac5d76ca486b6d224cc3269a9fb4d87bd6091484eefdc
MD5 3ff45670c644498c4e0ad37d4480de20
BLAKE2b-256 1a8ab1f230bc70588b2e81205c94e65c60ef4d24ba3c63fecf24c1268b5b6ef4

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