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.1.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.1.0.tar.gz.

File metadata

  • Download URL: cookiecutter_scientific_research-1.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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.1.0.tar.gz
Algorithm Hash digest
SHA256 70ded2595413246bdc0374dd817c22ce22d3b5ab0b99687e387291a8d119c552
MD5 0ba43c7b33746d770299b32956057dcf
BLAKE2b-256 10cfc0a5c07f87759d3dcdde4b9ec34392fcf0620252700f9cd3a0f4d1991485

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cookiecutter_scientific_research-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e111b82eef6373488018e75b24bf2d6b0dd666b5ce7fa8881ba8b65b52e0335
MD5 77b733e2535f22337c670f2572e7ea76
BLAKE2b-256 9b1d99444994b1c142d1fb5f3a1f821147a9f660bbe2b7c4fd446ba751f77749

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