Developer Information - GalSim-developers/GalSim GitHub Wiki

This is a page where we're collecting useful links and information for GalSim developers.

Repository information

The devel/ directory in the repository itself has a number of useful documents for developers. In particular, git.txt has a guide on Git usage (in general, and also the specifics of work-flow for this repository, guidelines on branch names, etc.). Developers might find the section at the end, "Putting git status info in your prompt", to be especially useful.

Also in devel/ are:

  • credo.txt: some style guidelines for naming of functions, tabs vs. spaces in code (the answer: no tabs!), etc.

  • c.vim: a file to make vim use our style guidelines

  • commit-msg: see comments at top for how to use. This file can be used to make git append the issue number to each commit on a branch associated with that issue, so that the commit shows up on the GitHub issue page. Very useful!

  • doxygen_readme.txt: comments on the Doxygen documentation system

Workflow

When working on GalSim collaboratively via Github, we broadly employ "Github-flow": see http://scottchacon.com/2011/08/31/github-flow.html

In particular, paraphrasing from the article above:

  • Anything in the master branch is deployable.

  • To work on something new, create a descriptively named branch off of master (ie: #ISSUE_NUMBER).

  • Commit to that branch locally and regularly push your work to the same named branch on the server.

  • When you need feedback or help, or you think the branch is ready for merging, open a pull request.

  • After someone else has reviewed and signed off on the feature, you can merge it into master.

  • Once it is merged and pushed to ‘master’, you can and should deploy immediately.

So far, this system has proved to be very convenient for in depth code review, with hundreds of successful Pull Requests to date.