Skip to content
Jason Miller edited this page Feb 27, 2014 · 4 revisions

Contributing

MOOSE is definitely a collaborative effort and we always welcome contributions! When contributing to MOOSE you need to keep in mind that hundreds of people are depending on this code to do their jobs every day. Because of that we have specific policies, procedures and automated processes in place to maintain high code quality while allowing many changes to flow into the code daily.

Code Standards

When modifying or adding to MOOSE you need to follow the strict MOOSE Code Standard. These guidelines ensure a common look and feel to all of the code in MOOSE allowing developers to seamlessly move between sections of code and giving users a consistent interface.

Referencing Issues

Every modification to MOOSE must reference an issue number. This means that every commit that flows into MOOSE must have a #NNNN (where NNNN are the numbers for an issue such as #1234) present in the commit message. Further, every Pull Request also needs to reference an issue number in both its title and description. This achieves multiple purposes:

  • Each change is made for a reason
  • Who changed the code, why it was changed and how it was changed are all automatically intertwined providing record keeping that allows for backtracking when something goes wrong.
  • In the future when a piece of code needs to change it's easy to look back and understand why the current code exists and what goals it was trying to achieve.

Any commit not referencing an issue will be rejected by the testing system and will be removed from the history of the 'devel' branch. Any pull request not referencing a ticket will receive comments asking for the submitted to edit the pull request to add references to an issue.

Work In A Fork

The first step in modifying MOOSE is to create your own fork where you can commit your set of changes:

  1. Navigate to https://github.com/idaholab/moose
  2. Click the "Fork" button in the upper right:
  3. Clone your fork to your local machine (replace "username" with your GitHub username):
git clone https://github.com/username/moose.git
  1. Add the real MOOSE repository as a remote named "upstream":
cd moose
git remote add upstream https://github.com/idaholab/moose.git
  1. Make your modifications and commit them to a branch (be sure to reference an Issue # in your commit messages.)
  2. Before contributing your changes you should rebase them on top of the current set of patches in the "devel" branch in the real MOOSE repo:
git pull --rebase upstream devel
  1. Push your branch back into your fork on GitHub:
git push origin branch_name

Use Pull Requests

Clone this wiki locally