cookiecutter data science
v2.0.0
用于进行和共享数据科学工作的逻辑,合理标准化但灵活的项目结构。
CookieCutter数据科学(CCD)是设置包含最佳实践的数据科学项目模板的工具。要了解有关CCD的理念的更多信息,请访问项目主页。
CookieCutter Data Science V2已从V1变化。现在,它需要安装新的CookieCutter-Data-Science Python软件包,该软件包扩展了CookieCutter模板实用程序的功能。使用提供的
ccds命令行程序而不是cookiecutter。
CookieCutter数据科学V2需要Python 3.8+。由于这是一个交叉项目的实用程序应用程序,因此我们建议将其与PIPX安装。安装命令选项:
# With pipx from PyPI (recommended)
pipx install cookiecutter-data-science
# With pip from PyPI
pip install cookiecutter-data-science
# With conda from conda-forge (coming soon)
# conda install cookiecutter-data-science -c conda-forge 要启动一个新项目,请运行:
ccds新项目的目录结构将看起来像这样(取决于您选择的设置):
├── LICENSE <- Open-source license if one is chosen
├── Makefile <- Makefile with convenience commands like `make data` or `make train`
├── README.md <- The top-level README for developers using this project.
├── data
│ ├── external <- Data from third party sources.
│ ├── interim <- Intermediate data that has been transformed.
│ ├── processed <- The final, canonical data sets for modeling.
│ └── raw <- The original, immutable data dump.
│
├── docs <- A default mkdocs project; see www.mkdocs.org for details
│
├── models <- Trained and serialized models, model predictions, or model summaries
│
├── notebooks <- Jupyter notebooks. Naming convention is a number (for ordering),
│ the creator's initials, and a short `-` delimited description, e.g.
│ `1.0-jqp-initial-data-exploration`.
│
├── pyproject.toml <- Project configuration file with package metadata for
│ {{ cookiecutter.module_name }} and configuration for tools like black
│
├── references <- Data dictionaries, manuals, and all other explanatory materials.
│
├── reports <- Generated analysis as HTML, PDF, LaTeX, etc.
│ └── figures <- Generated graphics and figures to be used in reporting
│
├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g.
│ generated with `pip freeze > requirements.txt`
│
├── setup.cfg <- Configuration file for flake8
│
└── {{ cookiecutter.module_name }} <- Source code for use in this project.
│
├── __init__.py <- Makes {{ cookiecutter.module_name }} a Python module
│
├── config.py <- Store useful variables and configuration
│
├── dataset.py <- Scripts to download or generate data
│
├── features.py <- Code to create features for modeling
│
├── modeling
│ ├── __init__.py
│ ├── predict.py <- Code to run model inference with trained models
│ └── train.py <- Code to train models
│
└── plots.py <- Code to create visualizations
如果要使用旧的V1项目模板,则需要安装CookieCutter-Data-Science软件包或CookieCutter软件包。然后,将任一个命令行程序与-c v1选项:
ccds https://github.com/drivendataorg/cookiecutter-data-science -c v1
# or equivalently
cookiecutter https://github.com/drivendataorg/cookiecutter-data-science -c v1我们欢迎捐款!有关指南,请参见文档。
pip install -r dev-requirements.txtpytest tests