This document describes the HydrOffice BAG library and tools (0.2). For the source code, go here.
Development cheatsheet¶
Useful Mercurial commands¶
Merge a branch to default¶
hg update defaulthg merge 2.0.0hg commit -m"Merged 2.0.0 branch with default" -ugiumashg update 2.0.0hg commit -m"Close 2.0.0 branch" -ugiumas --close-branch
Open a new branch¶
hg update defaulthg branch 2.0.1hg commit -m"Created 2.0.1 branch" -ugiumas
Useful git commands¶
Syncing a fork (without SourceTree)¶
Add a remote that points to the upstream repo (from the forked project folder):
git remote -v(check before and after if the remote is present)git remote add upstream https://github.com/HDFGroup/hdf-compass
Fetching from the remote repository:
git branch -va(check all the available branches)git fetch upstream
Merging with the upstream repository:
git checkout master(to switch tomasterbranch)git merge upstream/master
Finally:
- :
git push origin master
Reset the fork¶
git remote add upstream https://github.com/HDFGroup/hdf-compassgit fetch upstreamgit branch backupgit checkout upstream/master -B mastergit push --force
In case of need to retrieve the original code status:
git checkout backup
Documentation¶
The documentation is built using sphinx:
pip install sphinx sphinx-autobuild
For the first time, the documentation template is created in the ‘docs’ folder:
mkdir docscd docssphinx-quickstart
To update the API documentation:
sphinx-apidoc -f -o docs/api hydroffice hydroffice/bag/scripts