Project Comport

Build Status

What is it?

An ETL Toolkit to take Police Accountability data from the IA Pro Internal Affairs Software and produce publicly available and useful websites allowing better citizen oversight.

What's the status?

Project Comport is in early development.

Who made it?

Project Comport is a project of the 2015 Indianapolis Code for America fellowship team.


Core Dependencies

Project Comport is a Flask app. It uses Postgres for a database and uses bower to manage its front end dependencies. Big thanks to the cookiecutter-flask project for a nice kickstart.

Installation and setup

Quick local installation

First, clone the repo and change into the project directory.

git clone
cd comport

Create a Python 3 virtual environment with virtualenv and (optionally) virtualenvwrapper and activate it. Read these detailed installation and usage instructions for those two tools if you don't have them installed already.

With virtualenv only:

virtualenv --no-site-packages -p python3 venv
source venv/bin/activate

With virtualenvwrapper:

mkvirtualenv --no-site-packages -p python3 comport
workon comport

Then install the required packages:

pip install -r requirements/dev.txt

And create and populate the project database (use if you're developing on OS X):

psql -c 'create database comport;'
python db upgrade

Bower is used to install front-end dependencies. Install node and npm, then use npm to install bower. When Bower's installed, use it to install Comport's front-end dependencies:

bower install

Finally, start the server:

python server

NOTE: The app's configuration lives in When different configurations (such as DevConfig) are referenced in the next sections, they are contained in that file.

If you want to send a notification to a Slack instance on certain events, copy the env.sample file to .env:

cp env.sample .env

Set up an Incoming Webhooks integration on Slack and save the value of Webhook URL as SLACK_WEBHOOK_URL in .env. This will not work when you're running Comport for development. To set the variable when the application is running on Heroku, follow these instructions.

Generating Fake Data

To generate some fake incident data, first start the server.

python server

Then, in another terminal, run the command below.

WARNING: This command will destroy and re-build the application's database from scratch, erasing departments, users, incidents, etc.

python test_client


In order to run the tests, you will need to create a test database. You can follow the same procedures outlined in the install section. By default, the database should be named comport_test:

create database comport_test;

To run the tests, run

python test

from inside the root directory.