Skip to content

Latest commit

 

History

History
118 lines (65 loc) · 2.73 KB

development.rst

File metadata and controls

118 lines (65 loc) · 2.73 KB

Development guide

This software is pre-production and should not be deployed to production servers.

Please follow rules from contributing guide <contributing.rst>.

  1. Install epel-release repository:
yum install epel-release

Note: that on production system, you should use Python 3.6 as describe here <install.rst>.

  1. Install Python 3.6:
yum install python36

OWCA uses pipenv to create python virtualenv with all tools required to run, validate and build the project.

  1. Install pip using 3.6 Python interpreter (available in epel release and "Software Collections" python collections:
python -m ensurepip
  1. Install pipenv in user mode:
pip install --user pipenv

See pragmatic installation of pipenv for more details on installing pipenv.

  1. Clone OWCA repository:
git clone https://github.com/intel/owca
  1. Further commands should be run from owca root directory:
cd owca
  1. Prepare virtual environment for OWCA:
pipenv install --dev
  1. Start using newly created virtualenv:
pipenv shell

Tip, you can use virtualenv created by pipenv in your favorite IDE. Use ` pipenv --where` to find location of python virutalenv and interpreter.

Those command should be run from virtual environment created by pipenv:

tox -e unit

Alternatively you can run tests manually (without tox):

PYTHONPATH=. pytest tests

You can use tox to check code style, or build packages:

tox -e flake8
tox -e owca_package
tox -e wrapper_package

You can run without building a distribution like this:

sudo env PYTHONPATH=. `which python3.6` owca/main.py -c configs/mesos_example.yaml --root

When rebuilding you can use existing PEX build cache, to speedup building process (cache TTL set to 7 days):

PEX_OPTIONS='--no-index --cache-ttl=604800' tox -e owca_package