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.3.0.tar.gz (9.8 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.3.0.tar.gz.

File metadata

  • Download URL: cookiecutter_scientific_research-1.3.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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.3.0.tar.gz
Algorithm Hash digest
SHA256 ef4024a7598dc8395d5c4012b76b6e6ac5db2639c91938a6226d6f7b426055e3
MD5 65a98946367c0e56566bfe5181841ca7
BLAKE2b-256 db7616b5acf571a8ed6e2e18eac575ec9d6fa77e4e176be3b5af3fbc278079e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cookiecutter_scientific_research-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37e4010e529e202f4d19558b791cfada9ea7804539a429dc0e65d0fe50a294bd
MD5 a3c1163448288b1e45530aef7291f658
BLAKE2b-256 fa6dd006ecf31b1845d5ab4d9ddbc192b834bead4d412ad577f2360bf8b86ec5

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