How much do your public officials make?
- Python 3.x
- Postgres >= 9
- GNU Make
Perform the following steps from your terminal.
-
Clone this repository and
cd
into your local copy.git clone https://github.com/datamade/bga-payroll.git cd bga-payroll
-
Create a virtual environment. (We recommend using
virtualenvwrapper
for working in a virtualized development environment.)mkvirtualenv bga
-
Install the requirements.
pip install -r requirements.txt
-
Copy the local settings file. Note that you may need to update
DATABASES
in your own copy oflocal_settings.py
to reflect your local Postgres setup.cp bga_database/local_settings.py.example bga_database/local_settings.py
-
Create the database and run the migrations.
make database python manage.py migrate
-
Run the app. In three seperate terminal windows:
redis-server
celery --app=bga_database.celery:app worker --loglevel=DEBUG
python manage.py runserver
-
In the project directory, make a test data file.
make 2016-formatted.csv
-
Go to
http://localhost:8000/data-import/
and follow the steps to upload the CSV you just made. Don't forget to put in the data year. It will take a bit to complete each step, you can refresh the page to see if it's ready to move on to the next section. You can also keep track of progress in your Celery terminal.