Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 1.65 KB

README.md

File metadata and controls

60 lines (45 loc) · 1.65 KB

💰 bga-payroll

How much do your public officials make?

Requirements

  • Python 3.x
  • Postgres >= 9
  • GNU Make

Running the app locally

Perform the following steps from your terminal.

  1. Clone this repository and cd into your local copy.

    git clone https://github.com/datamade/bga-payroll.git
    cd bga-payroll
  2. Create a virtual environment. (We recommend using virtualenvwrapper for working in a virtualized development environment.)

    mkvirtualenv bga
  3. Install the requirements.

    pip install -r requirements.txt
  4. Copy the local settings file. Note that you may need to update DATABASES in your own copy of local_settings.py to reflect your local Postgres setup.

    cp bga_database/local_settings.py.example bga_database/local_settings.py
  5. Create the database and run the migrations.

    make database
    python manage.py migrate
  6. Run the app. In three seperate terminal windows:

    redis-server
    celery --app=bga_database.celery:app worker --loglevel=DEBUG
    python manage.py runserver
  7. In the project directory, make a test data file.

    make 2016-formatted.csv
  8. 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.