coffee
Coronagraph Optimization For Fast Exoplanet Exploration
Working with git

Modules

Most of milk's code is in a set of modules. Each module is compiled as a shared object loaded by the main process at runtime.

In Git, each module has its own repository, linked to the package as a git submodule.

Synchronization: loading updated modules

To get latest modules (master branches) :

git submodule foreach "(git checkout master; git pull)"

To get latest modules (dev branches) :

git submodule foreach "(git checkout dev; git pull)"

Editing submodule source code

When developing, work in dev branch and set branch to dev in all submodules and main package:

git submodule foreach "(git checkout dev; git pull; git push)"
git checkout dev
git pull
git push

Updating master branches

To synchronize master to latest dev:

git submodule foreach "(git checkout master; git merge dev)"
git checkout master
git merge dev
git submodule foreach "(git checkout master; git push)"
git push

When updating master, it's good practice to also issue a git tag

git tag -a v0.1.23 -m "Version 0.1.23"
git push origin v0.1.23

Documentation

Building local documentation

Documentation tree can be locally built on dev or master branch with doxygen from main directory:

doxygen

Documentation root is:

./dochtml/html/index.html

Pushing

Documentation is built in local subdirectory dochtml/html, which is linked to branch gh-pages. To upload new documentation:

cd dochtml/html
git add .
git commit -am 'updated doxygen documentation'
git push origin gh-pages

Note that the git add command is required as doxygen will modify, remove and create numerous files.