Wheretofind.me
Server development
You will need:
- Python 3.7 or later (
brew install [email protected]
) - Pipenv (
brew install pipenv
) - PostgreSQL (
brew install postgres
or Postgres.app) - yarn (
brew install yarn
)
Ensure the development database exists:
createdb wheretofindme
Set the following environment variables in a .env
file in the repo
root:
export DJANGO_SECRET_KEY=$(uuidgen) export DJANGO_DEBUG=True export SENDGRID_API_KEY=INVALID
Use pipenv
to get the database into a good state:
$ pipenv sync --dev $ pipenv run python manage.py migrate
Then get the frontend building:
$ yarn install $ yarn serve
Then, you can visit the local site at http://localhost:8000/
. The
terminal output will say :8080
, but ignore it, it's a liar.
Dependencies
To add Python dependencies:
$ pipenv install (--dev) <dep name>
To add JavaScript dependencies:
$ yarn add (--dev) <dep name>
Tests
The Python tests are written using pytest
, pytest-django
,
pytest-cov
, and pytest-factoryboy
. You can run them easily with
yarn py:test:unit
.
The JavaScript tests are written using Jest and Vue's unit-test helpers.
You can run them easily with yarn js:test:unit
.
We require 100% test coverage on both parts. We will gladly help you with any test-writing issues you may have.