Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 1.8 KB

README.md

File metadata and controls

67 lines (43 loc) · 1.8 KB

Rosie, the robot

A Python application reading receipts from the Quota for Exercising Parliamentary Activity from Brazilian's Chamber of Deputies and Federal Senate. Rosie flag suspicious reimbursements and, in that case, offer a list of reasons why it was considered suspicious.

Running

With Docker

Running

$ docker run --rm -v /tmp/serenata-data:/tmp/serenata-data serenata/rosie python rosie.py run <module-name>

<module-name> might be either chamber_of_deputies or federal_senate. After running it, check your /tmp/serenata-data/ directory in you host machine for suspicions.xz. It's a compacted CSV with all the irregularities Rosie was able to find.

Testing

$ docker run --rm -v /tmp/serenata-data:/tmp/serenata-data serenata/rosie python rosie.py test

Without Docker

Setup

There are a few options to setup your environment and download dependencies. The simplest way is installing Anaconda then run:

$ conda update conda
$ conda create --name serenata python=3
$ conda activate serenata
$ pip install -r requirements.txt

Running

$ python rosie.py run <module-name>

<module-name> might be either chamber_of_deputies or federal_senate.

A /tmp/serenata-data/suspicions.xz file will be created. It's a compacted CSV with all the irregularities Rosie was able to find.

You can choose a custom a target directory:

$ python rosie.py run chamber_of_deputies --output /my/serenata/directory/

Testing

You can either run all tests with:

$ python rosie.py test

Or test each submodule a time by passing a name:

$ python rosie.py test core
$ python rosie.py test chamber_of_deputies
$ python rosie.py test federal_senate