Skip to content

Development Environment

Nissy0409 edited this page Jul 14, 2021 · 13 revisions

Brief

Explain about cliboa local development envieonment.

Requirements

Install git, docker, docker-compose, python, pipenv or etc...

Local Development Environment

build docker container

# firstly, clone cliboa repository on your local computer
cd /usr/local
git clone https://github.com/BrainPad/cliboa.git

# it is possible to develop under cliboa directory on your local computer. Bind in Dockerfile synchronizes src code to that on docker container. 
cd cliboa

# build docker image
cd tools/docker
docker-compose build

# run docker container
docker-compose up -d

# check docker container
docker ps 
CONTAINER ID        IMAGE                      COMMAND             CREATED             STATUS              PORTS               NAMES
4e288fb3bf40        docker_cliboa_debian_dev   "bash"              45 hours ago        Up 17 hours                             cliboa_debian_dev

# login docker container
docker exec -it cliboa_debian_dev bash
root@4e288fb3bf40:/#

# it is possible to develop under cliboa directory on docker container
cd /usr/local/cliboa

initialize development environment

# install dependencies
pipenv install --dev

cd /usr/local/cliboa
python3 tools/script/init_dev.py

unittest

cd /usr/local/cliboa

# execute
pipenv run coverage

format

cd /usr/local/cliboa

# execute
pipenv run lintfix