-
python -m venv venv
-
source venv/bin/activate
-
venv/bin/pip install -e . -r requirements.txt -r requirements-dev.txt
Create the db from scratch from current migrations or run a new migration
venv/bin/alembic upgrade head
Auto-generate an alembic migration from a model. Example:
-
Add your models MetaData object to
alembic/env.py
ex.from friday_night.models.user import Base
-
venv/bin/alembic revision --autogenerate -m "Added accounts table"
venv/bin/pytest tests [-s, -k]
-
venv/bin/coverage run -m pytest tests
-
Use
venv/bin/coverage report
to report on the results (orcoverage html
and open in browser)
venv/bin/gunicorn --reload "friday_night.app:get_app()"