-
Notifications
You must be signed in to change notification settings - Fork 4
Development Environment
Geoffroy Noël edited this page Dec 15, 2019
·
5 revisions
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"
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. Another advantage is this approach is that you can omit to prefix all your calls to python and its tools with poetry run
(see other sections below).
cd django-controlled-vocabulary
python -m venv .venv
source .venv/bin/activate
pip install pip -U
pip install poetry
poetry install
cd tests
poetry run python manage.py test controlled_vocabulary
To check code coverage of the tests:
poetry run coverage run --include "*controlled_vocabulary*" tests/manage.py test controlled_vocabulary
poetry run coverage report
cd tests
poetry shell
./manage.py migrate
./manage.py vocab init
./manage.py runserver 0:8000
poetry run tox
poetry version
poetry build
poetry publish