vykozlov / cookiecutter-deep

A template for new DEEP modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

DEEP Modules Template

This is the template for developing new modules in the DEEP Platform. It uses Cookiecutter to generate the templates. This template is based on the CookieCutter Datascience template.

There are different versions of this template:

  • master: this is what 99% of users are probably looking for. Simple, minimal template, with the minimum requirements to integrate your code in DEEP.
  • child-module: this is a fork of the master branch specifically tailored to users performing a retraining of an existing module. It only creates a Docker repo whose container is based on an existing module's Docker image.
  • advanced: this is a more advanced template. It makes more assumptions on how to structure projects and adds more files than those strictly needed for integration. Unless you are looking for some specific feature, you are probably safer using master.

To create a new template of your project, install cookiecutter and run it with this template:

pip install cookiecutter
cookiecutter https://github.com/deephdc/cookiecutter-deep.git --checkout master

Once you answer all the questions, two directories will be created:

  • DEEP-OC-<your_project>: this is where the Docker container code goes
  • <your_project>: this is where your module's code goes

Each directory is a git repository and has two branches: master and test. This is what the folder structures look like:

<your_project>
##############
├── LICENSE                <- License file
│
├── README.md              <- The top-level README for developers using this project.
│
├── requirements.txt       <- The requirements file for reproducing the analysis environment, e.g.
│                             generated with `pip freeze > requirements.txt`
│
├── setup.py, setup.cfg    <- makes project pip installable (pip install -e .) so
│                             {{cookiecutter.__repo_name}} can be imported
│
├── {{cookiecutter.__repo_name}}    <- Source code for use in this project.
│   │
│   ├── __init__.py        <- Makes {{cookiecutter.__repo_name}} a Python module
│   │
│   ├── api.py             <- Main script for the integration with DEEP API
│   │
│   ├── misc.py            <- Misc functions that were helpful accross projects
│   │
│   └── tests              <- Scripts to perfrom code testing
│
└── Jenkinsfile            <- Describes basic Jenkins CI/CD pipeline


DEEP-OC-<your_project>
######################
├─ Dockerfile             <- Describes main steps on integration of DEEPaaS API and
│                            <your_project> application in one Docker image
│
├─ Jenkinsfile            <- Describes basic Jenkins CI/CD pipeline
│
├─ LICENSE                <- License file
│
├─ README.md              <- README for developers and users.
│
└── metadata.json         <- Defines information propagated to the DEEP Marketplace

More extended documentation can be found here. If you want to look at a minimal app using this template structure check demo_app and DEEP-OC-demo_app.

About

A template for new DEEP modules.

License:MIT License


Languages

Language:Python 84.0%Language:Dockerfile 16.0%