Code and commit style

Git branching

We are using the Gitflow branching model. Basically:

  • The master branch contains stable code, and each commit represents a tagged release.
  • The develop branch is an integration branch for new features, and is merged into master when we are ready to tag a new release.
  • New features are developed in feature/* branches. Branch from master, and create a pull request when you are ready to have a feature branch merged back into develop.

The SourceTree app (OS X and Windows) has built-in support for Gitflow, and there is also a collection of git-extensions for command line users.

Code style

It’s important that we adopt a consistent code style to minimise code churn and make collaboration easier.

  • Follow the Architectural conventions.
  • Follow PEP8 for Python code, unless there is a good reason not to.
  • Install the EditorConfig plugin for your preferred code editor. GLAMkit comes with an .editorconfig file which indicates which formatting defaults to use for different file types.