Skip to content
Tomas Torsvik edited this page Jun 5, 2020 · 9 revisions

Welcome to the BLOM wiki!

This wiki is mainly documenting how to work with the BLOM repository with git and GitHub.

See NorESM documentation for BLOM user documentation.


Contributing to BLOM/iHAMOCC

We welcome contributions to the BLOM/iHAMOCC model system, including bug reports and fixes, suggestions/contributions for code improvements, and suggestions for feature enhancements or inclusion of new features.

  1. Create an issue to describe the problem and/or suggested fix.
    • In case of feature enhancements or new features, discuss if a separate feature branch should be created.
  2. Fork the repository if you wish to contribute code.
  3. Submit changes for review through pull requests.
    • Check that the pull request does not create conflicts. In case of conflicts, try to fix this in the pull request, or ask a maintainer for advice.
    • Changes to the master branch should be reviewed by at least one of the maintainers (other than the one submitting the pull request)

Please refer to the gitHub help pages for instructions on how to create issues, fork or clone a repository, and create a pull request.

Forking workflow

Developers should mainly use a forking workflow for contributions to BLOM/iHAMOCC, as this encourages regular code review of all changes. The forking layout we aim for is described in this coderefienry instruction page. Contributors are strongly encouraged to read through these instructions, and note in particular the respective roles of the central repository, the fork and the local clone.

 HINT: When forking a repository, it can sometimes be an advantage to give your 
 personal fork a distinct name derived from the central repository, e.g. 
 "BLOM-<github user name>", to distinguish the fork from the upstream source.

Working with a fork (origin) and central repository (upstream)

When cloning your personal fork to your local computer, you will only be able to access your own work space. Running

$ git remote [-v, --verbose]

should produce an output

 origin	https://github.com/<personal gitHub account>/<BLOM-fork-name>.git (fetch)
 origin	https://github.com/<personal gitHub account>/<BLOM-fork-name>.git (push)

Make your local clone aware of changes in the central repository (upstream) by running

$ git remote add upstream https://github.com/NorESMhub/BLOM.git

Now you should be able to see the main repository as well

 $ git remote -v
 origin	https://github.com/<personal gitHub account>/<BLOM-fork-name>.git (fetch)
 origin	https://github.com/<personal gitHub account>/<BLOM-fork-name>.git (push)
 upstream	https://github.com/NorESMhub/BLOM.git (fetch)
 upstream	https://github.com/NorESMhub/BLOM.git (push)