Clone wiki

agalma / Release instructions

Release instructions

This page describes the process for releasing a new version of Agalma.

Preparing the repository

See https://bitbucket.org/caseywdunn/agalma/wiki/Git%20branching%20model.md#!git-branching-model to understand the git branching model, which will result in changes being on particular branches pre-release. These instructions assume that this model has been followed.

First, make sure that the relevant changes are in the devel branch:

git checkout devel
git merge master # fix any conflicts
git checkout -b release-0.5.0

Where 0.5.0 here and below is replaced with the release number.

Run the full (Tutorial)[https://bitbucket.org/caseywdunn/agalma/src/master/TUTORIAL.md] analysis on the devel branch with agama test. This is a required test of the code before making a release. Only proceed if it completes without error. If there are errors, fix and retest.

Update the NEWS file on the release branch to summarize the commits since the next release.

Update __version__ = in agalma/__init__.py.

Releasing on Conda

Once the release branch is finalized, edit the recipe in dev/conda/agalma/meta.yaml to bump the versions in these sections:

package:
  name: agalma
  version: 1.0.0

source:
  fn: agalma-1.0.0.zip
  url: https://bitbucket.org/caseywdunn/agalma/get/release-1.0.0.zip
  sha256: 519f139e741d2f685f87c32dc8f198346b3017fab19682fd69ca082b290a848d

After you update the version numbers commit and push. The zip file in the url is automatically generated by Bitbucket from the latest commit on the release branch. To update the sha256 sum, you will need to separately download the zip file and run sha256sum on it, e.g.:

wget https://bitbucket.org/caseywdunn/agalma/get/release-1.0.0.zip
sha256sum release-1.0.0.zip

Update the sha256 sum in the file, but do not commit and push yet.

Then build the image from inside the Docker build container with:

docker run -it -v $HOME/agalma/dev/conda:/recipes mhowison/conda-build bash # change -v path to host agama repo
conda update -n root conda-build # make sure you have the latest conda and conda build
cd /recipes/<package-name>
conda build -c dunnlab .

If the test passes and the recipe builds successfully, upload/release the package on anaconda.org from within the Docker container with:

anaconda login
anaconda upload <path to built .tar.bz2>

where the login username is "dunnlab".

Finally, commit and push the release branch.

This is the minimal set of instructions for generating a new Conda release and assumes that biolite has not changed. In particular, if the new agalma release has a corresponding release with biolite, or involves updating third-party dependencies, those recipes need to be updated and rebuilt first. The final recipe to be rebuilt will always be agalma.

More background on how the Conda recipes work: https://bitbucket.org/caseywdunn/agalma/wiki/Conda%20recipes

Releasing on Docker Hub

https://bitbucket.org/caseywdunn/agalma/src/master/dev/docker/ has a Dockerfile to build a centos with Agalma installed via conda.

To build the image, run:

cd dev/docker
docker build .

To release the image on Dockerhub, run:

docker tag <insert hash for new image> dunnlab/agalma:<version>
docker tag <insert hash for new image> dunnlab/agalma:latest
export DOCKER_ID_USER="dunnlab"
docker login
docker push dunnlab/agalma

Syncing master

Once the release is finished and pushed to Anaconda and Dockerhub, finish syncing up the branches with:

git checkout devel
git merge --squash release-0.5.0
git commit -am "finished testing release 0.5.0"
git checkout master
git merge --squash devel
git commit -am "0.5.0"
## sync up all the branches with the new master commit
git checkout hotfix
git merge master
git checkout devel
git merge master
git push origin --all

Updated