Skip to content

Create new project

Takaaki Gordon Mizuno edited this page Aug 3, 2021 · 5 revisions

Summary

Poddet task foundation provides a CLI tool named "Podder Task Cli". This is a tool to create a new project on your local machine. You can create a new project template with this CLI.

Preparation

Podder task foundation requires python 3.6.2 + and pyenv/virtualenv. So you need to install virtualenv and pyenv in advance.

You can install virtual env with pip command.

pip install virtualenv

Then you need to install pyenv. See the official repository to install: https://github.com/pyenv/pyenv. Basically you may need to git clone pyenv repository and add path ( installment process depends on the environment you are using ).

git clone git://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.profile
echo 'eval "$(pyenv init --path)"' >> ~/.profile

Then, you may set your required python version to local.

pyenv install 3.9.6
pyenv local 3.9.6

And also, it uses Poetry for package management. So you also need to install poetry too.

pip install poetry

Next step is installing Podder Task Cli.

pip install git+ssh://[email protected]/podder-ai/podder-task-cli.git

To check whether you could install Podder Task CLI or not, you can run the podder command.

podder --version

Once you have the version number in place, you're ready to create a new project.

Create your new process

You can create a new project with the following command.

podder new [name]

This command generates the following files and directories on the current directory.

[name]
├── README.md
├── config
│     └── [name]
│            └── model.json
├── data
│     └── [name]
│            └── dummy_model.pth
├── input
│     └──[name]
├── manage.py
├── output
│     └── [name]
├── poetry.lock
├── processes
│     ├── __init__.py
│     └── [name]
│              ├── __init__.py
│              └── process.py
├── pyproject.toml
└── tests
    ├── __init__.py
    └── [name]
           ├── __init__.py
           └── test_process.py

[name] will be replaced with the name you set on the podder new [name] command.

You should never change the directory structure. All our systems assume that your model code has this directory structure.