Skip to content

Latest commit

 

History

History
76 lines (53 loc) · 1.62 KB

Development.md

File metadata and controls

76 lines (53 loc) · 1.62 KB

DEEPCODE CLI development mode description for developers

Python >= 3.6 is required for this package If you have an older version, please consider using pyenv to manage different python versions.

Environment setup

Package can be developed/built with Poetry:

Install poetry, dependencies and activate virtual environment:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python

Add a following line to your shell specific config file (~/.bashrc, ~/.zshrc):

export PATH="$HOME/.poetry/bin:$PATH"

For more details refer to Poetry documentation

Create virtual environment

poetry shell

(OPTIONAL) If you prefer to have all dependencies in the same place together with your code, create a virtualenv manually:

virtualenv ./venv --python python3
source ./venv/bin/activate

Troubleshooting: Make sure that your user has full rights to user folder with all subfolders

Install dependencies

poetry install

Description of cli options

poetry run deepcode --help

Module mode

CLI can work as command line interface and as imported module. To read more about module mode, see readme docs

Package build

  • Increment version in pyproject.toml.
  • Update changelog
  • Build
poetry build

Publishing

poetry publish

Tests

Make sure you have an API KEY in your account Copy your key.

Run tests:

DEEPCODE_API_KEY=<your key> poetry run pytest tests