-
- Once installed:
asdf install
to get Python and Poetry
- Once installed:
-
- MacOS:
$ brew install direnv
- Linux:
$ sudo apt install direnv
- Add
direnv hook
to your shell config - Restart your terminal
$ make .envrc
$ direnv allow
- MacOS:
-
- MacOS:
$ brew install postgres
(or your platform's equivalent)$ brew services start postgres
(or your platform's equivalent)
- Linux:
$ sudo apt install postgresql
- MacOS:
-
$ brew install redis
(or your platform's equivalent)$ brew services start redis
(or your platform's equivalent)
-
- MacOS:
$ brew install graphviz
(or your platform's equivalent) - Linux:
$ sudo apt install graphviz
- MacOS:
Generate some representative sample data for manual test:
$ createdb elections_dev
$ make data
Or, Docker option:
docker run --rm -e POSTGRES_PASSWORD -e POSTGRES_USER=$USER -e POSTGRES_DB=elections_dev -p 5432:5432 postgres
The default Django admin credentials are admin:password
.
Now you should be able to run the Django client on your local machine. Enter $ make run
in your terminal, then go to your browser and visit http://localhost:8000/
. If everything is working correctly, you should be able to see the Michigan Elections API.
If your database gets into a weird state, you can reset it from scratch:
$ make data/reset
You can also download production with valid Heroku credentials:
$ make data/production