Luxmusik / comport

Comport is a tool for law enforcement agencies to open their data and be accountable to their citizens.

Home Page:https://www.projectcomport.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

How

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 git@github.com:codeforamerica/comport.git
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 postgres.app if you're developing on OS X):

psql -c 'create database comport;'
python manage.py 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 manage.py server

NOTE: The app's configuration lives in settings.py. 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 manage.py 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 manage.py test_client

Testing

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:

psql
create database comport_test;

To run the tests, run

python manage.py test

from inside the root directory.

License

See LICENSE.md.

About

Comport is a tool for law enforcement agencies to open their data and be accountable to their citizens.

https://www.projectcomport.org

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 70.0%Language:JavaScript 22.0%Language:HTML 7.1%Language:CSS 0.7%Language:Ruby 0.1%Language:PowerShell 0.0%Language:Mako 0.0%Language:Makefile 0.0%