Application developed for interview testing for quorum.us with the aim of allowing the user to view data on Legislators, their votes and Bills.
The project was developed using poetry package management, but can also be developed using pip.
After create a virtual environment, install the ependencies.
poetry installAfter create a virtual environment (ex. venv), install the ependencies.
pip install -r requirements.txtTo do this, just run:
make migratePlace the CSV files in the directory /src/congress/csvfiles/.
WARNING:
- It is essential that the file names begin with the following patterns: legislators, bills, votes and vote_results.
- There should only be four files in the
csvfiles/directory
After that and run:
make populateIf there is any inconsistency in the data imported from the CSV file, error messages similar to these will appear.
[csv inconsistency] [bill id 2900994] Does not exist Legislator with sponsor_id: 400100
[csv inconsistency] [vote id 3314452] Does not exist Bill with bill_id: 29
[csv inconsistency] [vote id 3321166] Does not exist Bill with bill_id: 295
[csv inconsistency] [vote result id 92516784] Does not exist Vote with vote_id: 3321166
[csv inconsistency] [vote result id 92516770] Does not exist Vote with vote_id: 3321166Run
make upAcsess http://127.0.0.1:8000/congress
Run
make test