Skip to content

Contribution Guidelines

Aboobacker MK edited this page Aug 20, 2018 · 7 revisions

Thank you for your interest in contributing to rescuekerala.

Submitting issues

Before filing a bug on GitHub

  1. Before you report the bug, ensure that it is not already submitted.
  2. If there is an already reported issue, try to add more details to it

How to report a bug

  1. For each bug, file a separate issue here

Other details

  1. If you have the exact precise step great - you are filing a very useful issue.
  2. If you are able to reproduce occasionally, mention that and provide as much information as possible.
  3. Also mention the browser, version, OS, etc.
  4. Adding screenshots, GIFs, etc. would make it easier to reproduce.

Reproducing the issues

  1. If you are not able to reproduce any issues locally, mention in #testing in slack

Testing Pull Requests

To check if the PR submitted fixes the issue

  1. Checkout the Pull Request you would like to test by
    git fetch origin pull/ID/head:BRANCHNAME`
    git checkout BRANCHNAME
    

Example git fetch origin pull/406/head:jaseem git checkout jaseem1 3. ## Testing Pull Requests

  1. Checkout the Pull Request you would like to test by

    git fetch origin pull/ID/head:BRANCHNAME`
    git checkout BRANCHNAME
    
  2. Example

    git fetch origin pull/406/head:jaseem  
    git checkout jaseem1
    
  3. Run Migration if there are any changes in schema.

  4. Also, check if there is any change is env.sample file.If there is an update the .env

Importing Database Dump

  1. Ask the #testing channel for the latest dump
  2. Create the database
  3. Follow the instructions
     CREATE ROLE keralarescue
     ALTER USER keralarescue with SUPERUSER CREATEDB`
     ALTER USER keralarescue with password 'password'` 
     Change .env `B_DATABASE_URL="postgres://keralarescue:password@localhost/rescuekerala
    
  4. psql -U postgres rescuekerala < rescuekerala_20180818.sql

Creating migration files

If your code changes anything in models.py, you might need to make changes in the database schema, or other constraints. To create migrations files, run python3 manage.py makemigrations --settings=floodrelief.settings after making your changes. Also, make sure to add these files in the commit.