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