How To Contribute

Start contributing today!

Introduction

Below is the workflow for having your contribution accepted into the pattoo-mobile repository.

  1. Create an Issue or comment on an existing issue to discuss the feature

  2. If the feature is approved, assign the issue to yourself

  3. Fork the project

  4. Clone the fork to your local machine

  5. Add the original project as a remote (git remote add upstream https://github.com/PalisadoesFoundation/pattoo-mobile, check with: git remote -v)

  6. Create a topic branch for your change (git checkout -b BranchName)

  7. you may create additional branches if modifying multiple parts of the code

  8. Write code and Commit your changes locally. An example of a proper git commit message can be seen below:

  9. When you need to synch with upstream (pull the latest changes from main repo into your current branch), do:

    1. git fetch upstream
    2. git merge upstream/master
  10. Check for unnecessary white space with git diff --check.

  11. Write the necessary unit tests for your changes.

  12. Run all the tests to assure nothing else was accidentally broken

  13. Push your changes to your forked repository (git push origin branch)

  14. Perform a pull request on GitHub

  15. Your code will be reviewed

  16. If your code passes review, your pull request will be accepted

Code Style Guide

For ease of readability and maintainability code for all pattoo projects must follow these guidelines. Code that does not comply will not be added to the master branch.

  1. All pattoo projects use the Google Python Style Guide for general style requirements
  2. All pattoo python projects use the The Chromium Projects Python Style Guidelines for docstrings.
  3. Indentations must be multiples of 4 blank spaces. No tabs.
  4. All strings must be enclosed in single quotes
  5. In addition too being pylint compliant, the code must be PEP8 and PEP257 compliant too.
  6. There should be no trailing spaces in files

Guidelines to remember

  • Always opt for the most pythonic solution to a problem
  • Avoid applying idioms from other programming languages
  • Import each module with its full path name. ie: from pack.subpack import module
  • Use exceptions where appropriate
  • Use doc strings
  • Try not to have returns at multiple points in a function unless they are failure state returns.
  • If you are in the middle of a development session and have to interrupt your work, it is a good idea to write a broken unit test about what you want to develop next. When coming back to work, you will have a pointer to where you were and get back on track faster.

Commits

The pattoo projects strive to maintain a proper log of development through well structured git commits. The links below offer insight and advice on the topic of commit messages:

  1. https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message
  2. http://chris.beams.io/posts/git-commit/

Sample .vimrc File for Compliance

You can use this sample .vimrc file to help meet our style requirements