Skip to content
Eric Nawrocki edited this page Feb 25, 2020 · 20 revisions

Installation instructions for users

The Bio-Easel README includes information on how to install Bio-Easel for users (non-developers).

Initial checkout instructions for developers

The instructions below are relevant only to developers who wish to develop Bio-Easel or modify it in some way. For users interested only in using Bio-Easel, see the Installation instructions for users above.

Bio-Easel depends on Easel, also at github. To clone a Bio-Easel repository for the first time, and get it set up:

   $ git clone https://github.com/nawrockie/Bio-Easel.git
   $ cd Bio-Easel
   $ mkdir src
   $ (cd src; git clone https://github.com/EddyRivasLab/easel.git easel)

and to build:

   $ perl Makefile.PL
   $ make
   $ make test      # optional: run tests

If this fails, it may be because you do not have the Inline perl module installed. To install Inline:

   $ cpan install Inline
   $ cpan install Inline::C

Now you're set up on the stable master branches for both packages. To do any development, you need to work on the develop branch(es), generally by creating and merging feature branches.

To switch to develop branches:

   $ cd Bio-Easel
   $ git checkout develop
   $ cd src/easel
   $ git checkout develop

For information about our git workflow, read on.

git workflow

Bio-Easel uses the popular git workflow that's often just called "git flow". Go read the 2010 blog post by Vincent Driessen that describes it. But we use it with the difference that we don't mind having feature branches on origin.

In what follows, first we'll give concise-ish examples of the flow for normal development, making a release, and making a "hotfix". A summary of the principles and rationale follows the examples.

Normal development

Generally, for any changes you make to our code, you will make on a feature branch, off of develop. So first you create your branch:

   $ git checkout -b myfeature develop            

Now you work, for however long it takes. You can make commits on your myfeature branch locally, and/or you can push your branch up to the origin and commit there too, as you see fit.

When you're done, and you've tested your new feature, you merge it to develop (using --no-ff, which makes sure a clean new commit object gets created), and delete your feature branch:

   $ git checkout develop                     
   $ git merge --no-ff myfeature
   $ git branch -d myfeature
   $ git push origin --delete myfeature
   $ git push origin develop                  

Small features: single commits can be made to develop

Alternatively, if you're sure your change is going to be a single commit, you can work directly on the develop branch.

   $ git checkout develop                  
     # make your changes
   $ git commit
   $ git push origin develop               

Big features: keeping up to date with develop

If your work on a feature is taking a long time (days, weeks...), and if the develop trunk is accumulating changes you want, you might want to periodically merge them in:

   $ git checkout myfeature
   $ git merge --no-ff -m "Merges develop branch into myfeature branch" develop  

Making a release

To make a release, you're going to make a release branch of the code, and of the Easel repo if you made changes there as well. You assign appropriate version numbers to each, test and stabilize. When everything is ready, you merge to master and tag that commit with the version number; then you also merge back to develop, and delete the release branch.

For example, here's the git flow for a Bio-Easel release, depending on Easel. Suppose Bio-Easel currently at 0.03, and Easel is currently at 0.43. Suppose we decide this release will be Bio-Easel 0.1, and it does not depend on any new features in Easel, so we can use the last stable Easel release as it is (this will be the head of the master Easel git repo, which is what you should be using unless you made changes in src/easel/). To proceed we first go over to Easel and just make a tag:

   $ cd src/easel
   $ git checkout master
   $ git tag -a -m "Tags Easel 0.43 for Bio-Easel-0.1 release" Bio-Easel-0.1
   $ git push origin Bio-Easel-0.1

then go over and make a new release from Bio-Easel's develop branch:

   $ cd Bio-Easel
   $ git checkout develop # only necessary if you're not already on develop
   $ git checkout -b release-0.1 develop
     # change version numbers to 0.1; also dates, copyrights
     # list of files with versions and dates and copyrights is in Bio-Easel/dev-README
   $ git commit -a -m "Version number bumped to 0.1"
     # do and commit any other work needed to test/stabilize Bio-Easel release.

When you're finished merge the Bio-Easel release branch as follows:

   $ git checkout master
   $ git merge --no-ff -m "Merges release-0.1 branch into master" release-0.1
   $ git tag -a -m "Tags 0.1 release" Bio-Easel-0.1
   $ git push origin Bio-Easel-0.1
      # Now merge release branch back to develop...
   $ git checkout develop
   $ git merge --no-ff -m "Merges release-0.1 branch into develop" release-0.1
   $ git push
   $ git branch -d release-0.1
   $ git push origin --delete release-0.1

Release process with new features in Easel

Alternatively, what if our new release depends on some new features in Easel. In this case, we need to make a new Easel 0.44 release. You'll want to check with Easel developers before doing this though. In particular you want to ask them if all code in the 'develop' branch is ready to be released. If all Easel developers respond that it's okay to proceed with the release:

   $ cd Bio-Easel/src/easel
   $ git checkout develop # only necessary if you're not already on develop
   $ git checkout -b release-0.44 develop
     # change version numbers to 0.44; also dates, copyrights
   $ git commit -a -m "Version number bumped to 0.44"
     # do and commit any other work needed to test/stabilize easel release

then go over and make the Bio-Easel release as explained above in the example that bundled stable Easel 0.43.

When the release is ready we need to merge the Easel release branch:

   $ cd Bio-Easel/src/easel
   $ git checkout master
   $ git merge --no-ff -m "Merges release-0.44 branch into master" release-0.44
   $ git tag -a -m "Tags Easel 0.44 release" easel-0.44
   $ git push origin easel-0.44
   $ git tag -a -m "Tags Easel 0.44 for Bio-Easel-0.1 release" Bio-Easel-0.1    # This records that Bio-Easel-0.1 depends on Easel 0.44
   $ git push origin Bio-Easel-0.1
   $ git push

and finally, we do the same pattern on Bio-Easel itself (see above 'When you're finished merge the Bio-Easel release branch as follows')

Dependencies always have a tag for their own release (Easel 0.43), and may have additional tags for packages that depend on them (Bio-Easel 0.1 bundles Easel 0.43? Then there's a Bio-Easel-0.1 tag pointing to that Easel commit object).


If you need to fix a critical bug and make a new release immediately, you create a hotfix release with an updated version number, and the hotfix release is named accordingly: for example, if we screwed up Bio-Easel 0.03, hotfix-0.04 is the updated 0.04 release.

A hotfix branch comes off master, but otherwise is much like a release branch.

   $ cd Bio-Easel
   $ git checkout -b hotfix-0.04 master                 
     # bump version number to 0.04; also dates, copyrights
     # list of files with versions and dates and copyrights is in Bio-Easel/dev-README
   $ git commit -a -m "Version number bumped to 0.04"

Now you fix the bug(s), in one or more commits. When you're done, the finishing procedure is just like a release:

    $ git checkout master              
    $ git merge --no-ff -m "Merges hotfix-0.04 branch into master" hotfix-0.04
    $ git push
    $ git tag -a -m "Tags 0.04 release" Bio-Easel-0.04
    $ git push origin Bio-Easel-0.04
    $ git checkout develop              
    $ git merge --no-ff -m "Merges hotfix-0.04 branch into develop" hotfix-0.04
    $ git push
    $ git branch -d hotfix-0.04

And make a tag in Easel:

   $ cd src/easel
   $ git checkout master
   $ git tag -a -m "Tags Easel-0.43 for Bio-Easel-0.04 release" Bio-Easel-0.04
   $ git push origin Bio-Easel-0.04


There are two long-lived Bio-Easel branches: origin/master, and origin/develop. All other branches have limited lifetimes.

master is stable. Every commit object on master is a tagged release, and vice versa.

develop is for ongoing development destined to be in the next release. develop should be in a close-to-release state. Another package (e.g. Bio-Easel) may need to create a release of a downstream dependency (e.g. Easel) at short notice. Therefore, commit objects on develop are either small features in a single commit, or a merge of a finished feature branch.

We make a feature branch off develop for any nontrivial new work -- anything that you aren't sure will be a single commit on develop. A feature branch:

  • comes from develop
  • is named anything informative (except master, develop, hotfix-* or release-*)
  • is merged back to develop (and deleted) when you're done
  • is deleted once merged

We make a release branch off develop when we're making a release. A release branch:

  • comes from develop
  • is named release-<version>, such as release-1.2
  • first commit on the hotfix branch consists of bumping version/date/copyright
  • is merged to master when you're done, and that new commit gets tagged as a release
  • is then merged back to develop too
  • is deleted once merged

We make a hotfix branch off master for a critical immediate fix to the current release. A hotfix branch:

  • comes from master
  • is named hotfix-<version>, such as hotfix-1.2.1
  • first commit on the hotfix branch consists of bumping version/date/copyright
  • is merged back to master when you're done, and that new commit object gets tagged as a release.
  • is then merged back to develop too
  • is deleted once merged