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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters