Skip to content

Appendix A. Contribution Guidelines

isik5 edited this page May 18, 2017 · 1 revision

#Development Policy

Installing

To develop heritago, fork and clone the git this repo.

git clone https://github.com/forked-repository/heritago.git
cd heritago

Contributing to Django Backend App

Install dependencies by using pip (Python 3) in a virtualenv

cd heritago
pip install virtualenv 
virtualenv venv
source venv/bin/activate | (for windows users) venv\Scripts\activate
pip install -r requirements.txt

This backend application will require some 3rd services such as Elasticsearch, Redis etc. To make them available in an easier way, there is a docker file that will start each service with desired configurations.

First, you need docker-daemon installed on your system. Then you just issue the following command and all the services will start to run.

docker-compose up -d

Once this is done, go and start the backend application.

python manage.py migrate
python manage.py runserver

In any failure case, please report it in this repo's issues.

If everything is okay so far, you are ready to contribute.

Making Changes

tl;dr: Contributors should follow the standard team development practices.

  • Fork the repository on GitHub.
  • Create a topic branch from where you want to base your work.
  • This is usually the master branch.
  • Please avoid working directly on master branch.
  • Make commits of logical units (if needed rebase your feature branch before submitting it).
  • Check for unnecessary whitespace with git diff --check before committing.
  • Make sure your commit messages are in the proper format.
  • If your commit fixes an open issue, reference it in the commit message (#15).
  • Make sure your code comforms to PEP8.
  • Make sure you have added the necessary tests for your changes.
  • Run all the tests to assure nothing else was accidentally broken.

It is highly encouraged to follow this link and understand git branching model explained in it: http://nvie.com/posts/a-successful-git-branching-model

Submitting Changes

  • Push your changes to a topic branch in your fork of the repository.
  • Submit a Pull Request. (for code reviews this guideline will be followed)
  • Wait for maintainer feedback.

Don't' know where to start?

There are usually several TODO comments scattered around the codebase, maybe check them out and see if you have ideas, or can help with them. Also, check the open issues in case there's something that sparks your interest. What about documentation?