Version Numbering

Version Number

The CASA verison number is printed when CASA starts, and it is accessible from both Python and C++. It has four components, 1.2.3-4

  1. corresponds to the MAJOR version number; it is incremented based upon significance of features in an upcoming release
  2. corresponds to the MINOR version number; it is incremented for each release
  3. corresponds to the PATCH version number; it is incremented when fixes to a release are produced
  4. corresponds to the BUILD version number; it is incremented throughout the development and release cycle

The first version number of the 5.1 development cycle, for example, would be 5.1.0-1. With each new prerelease build, the BUILD version number will be incremented. These prerelease builds correspond to what we currently call “stable” builds. Currently they are produced nightly, but later, they will be produced when features or other changes are merged into the master branch. This means that when release 5.1 is released, its full version number will be 5.1.0-X, where X is greater than the number of tasks/features implemented during the development cycle but less than or equal to the number of days in the development cycle. This is due to the fact that all features/tasks will be developed on feature branches which are merged into the master after testing and the fact that these prerelease builds (from master) will be produced no more frequently than nightly.

Note that the build version number will increase linearly through the development in the master and the actual release branch.

To retrieve the version number in Python, use:

CASA <2>: cu.version()
      Out[2]: array([ 5,  0,  0, 38], dtype=int32)

To compare the current version number against a specific version number in Python, use:

CASA <3>: cu.compare_version('>',[5,0])
      Out[3]: True
CASA <4>: cu.compare_version('>',[5,0,1])
      Out[4]: False

To access the version number elements from C++, use:

#include version.h>
cout << VersionInfo::info( ) << endl;
printf( "%d.%d.%d-%d\n",
VersionInfo::minor( ),
VersionInfo::patch( ),
VersionInfo::feature( ) );

These two output lines produce the same output, e.g. something like "5.0.0-108".

Version Description Field

In addition to the version number, an additional description field if used to help identify versions that are built from a branch or do not tag information for the latest commit.

In the above cases the first version number indicates the nearest master tag of a branch point.

So for example for a case where the build is done from a branch that doesn't have an associated tag for the commit, but the nearest master tag is 5.0.0-148 the additional description contains the commit id, the full identifier looks like this:

CASA 5.0.0-148  ID 271cec2f81aa6bea027fae2c82cdac6198aab80c

For a branch with a tag on the most recent commit the identifier looks like this:

CASA 5.0.0-157  BT 5.0.0-157-bugfix-CAS-1234-1

The duplication of the version number is due to the branch tag containing the full version information (last master tag before branch + branch id + branch revision)