Supervise our congressmen spendings.
API with every congressman indemnifications budget provided in JSON format. Checkout the api queries documentation: wiki/Api
-
list all deputies
/api/deputies/
-
list indemnities, grouped by categories and deputies
/api/indemnities/categories/deputies/
-
list indemnities, grouped by categories and deputies, but only top5 deputies
/api/indemnities/categories/deputies/?top=5
Various 3rd Party libraries are needed in order to run Deputy Overwatch. Checkout the Dependencies documentation: wiki/Dependencies
- Flask
- SQLAlchemy
- Flask-SQLAlchemy
- Flask-Runner
- Flask-Runner
- Flask-Migrate
- Faker
- factory_boy
- inflection
- xmltodict
- webargs
Deputy Overwatch is built using Flask, an open source Python library for interacting with HTTP. The following steps will require to install the tools listed below:
-
Clone from bitbucket (this will create a deputy-overwatch folder in the current directory)
git clone https://bitbucket.org/diogolundberg/deputy-overwatch.git
-
[optional] Create a virtual environment. We suggest installing virtualenv with virtualenvwrapper. This allows python libraries to be installed easily and specifically on a per project basis.
Once this is complete, run the following to initialize your environment.
mkvirtualenv --python=python3 deputy-overwatch workon deputy-overwatch
-
Install the required Python libraries
pip install -r requirements.txt
-
Create the database
From the project's folder: python manage.py db upgrade
-
Scrape data to fill your database
From the project's folder: python manage.py scrape
-
Run the site locally!
python manage.py runserver
-
Make sure to check where the database is being created(project's root) and get a SQLite client to check it!
-
This project is set up to check pep8 offenses in a pipeline, install a good linter to save time
-
Finally, the most important, run tests! Try to use some good practices like TDD.
python manage.py test
nosetests --with-coverage --cover-erase --cover-package=overwatch --cover-html