Corruption is a huge bane to Africa’s development. African countries must develop novel and localised solutions that will curb this menace, hence the birth of iReporter. iReporter enables any/every citizen to bring any form of corruption to the notice of appropriate authorities and the general public. Users can also report on things that needs government intervention
You can clone this repo on your local machine or checkout the user-interface on gh-pages and the app is hoted on heroku
Install python on your local machine
Clone the this repo on your local machine
$ git clone https://github.com/Emmanuelaaron/iReporter-Database.git
cd into the cloned directory, install the virtual environment and activate, checkout to the most stable branch and install all the dependences.
$ cd iReporter-database
$ pip install virtualenv
$ virtualenv venv
$ source venv/Scripts/activate
$ git checkout develop
$ pip install -r requirements.txt
$ python run.py
- copy the Url it into postman and put to run any endpoint of your preference in the table below with the url prefix ('/api/v2') for each endpoint.
HTTP Method | Endpoint | Functionality | Parameters |
---|---|---|---|
POST | /auth/signup | User is able to signup | None |
POST | /auth/login | User is able to login | None |
POST | /incidence | Creates incidences | None |
GET | /interventions | Gets all interventions | None |
GET | /red-flags | Gets all red flags | None |
GET | /interventions/int:incident_id | Gets a specific intervention | incident_id |
GET | /red-flags/int:incident_id | Gets a specific red flag | incident_id |
DELETE | /interventions/int:incident_id | Deletes a specific intervention | incident_id |
DELETE | /red-flags/int:incident_id | deletes a specific red flag | Flag_id |
Install pytest, activate the virtual environment and then run the tests
$ pip install pytest
$ pytest
You can checkout the code coverage by using the code below
$ pytest --cov=.
Make sure your virtual environment is activated
The application is hosted on heroku
- python
- Flask Micro web framework for python
- pip package installer for python
- Virtualenv Tool used to created isolated programs for python
- Postgresql
So far this application has been built with
To contribute to this project please create a branch off the develop after which you will create a pull request before it is merged back.
By Emmanuel Isabirye