Skip to content

Development Environment

Geoffroy Noël edited this page Dec 15, 2019 · 5 revisions

On-off set up

Install Poetry

Either globally

This option is convenient as you can call poetry from anywhere in your system. But it pollutes your python system environment with a lot of new packages.

cd django-controlled-vocabulary
sudo pip install "poetry<1"

OR in its own virtual environment

Preferred solution as it's more isolated. But you'll need to remember to enter the environment with source .venv/bin/activate before you can call poetry.

cd django-controlled-vocabulary
python -m venv .venv
source .venv/bin/activate
pip install pip -U
pip install poetry

THEN install dependent packages

poetry install

Run Django tests

cd tests
poetry run python manage.py test controlled_vocabulary

Run Django testing app

cd tests
poetry shell
./manage.py migrate
./manage.py vocab init
./manage.py runserver 0:8000

Run Tox tests

poetry run tox

Build package & Publish to Pypi

poetry version
poetry build
poetry publish
Clone this wiki locally