Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Development Setup

Jeremy edited this page Aug 23, 2018 · 3 revisions

macOS Development Setup

  1. Install the pip package manager
sudo easy_install pip
  1. Install Pyenv with brew
brew update
brew install pyenv pyenv-virtualenv
  1. Install Python 3.6.4 with Pyenv
pyenv install 3.6.4
  1. Create and activate virtualenv with Python 3.6.4
pyenv virtualenv 3.6.4 v-3.6.4
pyenv activate v-3.6.4
  1. Install the dependencies
pip install pipenv
pipenv install
  1. Create a PostgreSQL database
createdb your_postgresql_database_name
  1. Run the database migrations
python manage.py db upgrade
  1. Run the deployment command to fetch API Data and create the admin user
python manage.py deploy
  1. In one terminal, start the worker
pyenv activate v-3.6.4
celery worker -A celery_worker.celery --loglevel=info
  1. In another terminal, run the server
pyenv activate v-3.6.4
python run.py

Unit Tests

Unit tests may be run with:

python manage.py test

Coverage Reports

Coverage reports may be generated with:

coverage run --source=app manage.py test
coverage report
Clone this wiki locally