Version Numbers and Releases for Opus/UrbanSim

Opus and UrbanSim support accessing version numbers (again, after a disappearance for a bit). The version number for the opus_core module can be found in the usual Python fashion:

opus_core.__version__

(In the future we may add the __version__ attribute to all Opus/UrbanSim modules.)

For stable releases, the version is something like '4.2.1', where 4 is the major release number (i.e. UrbanSim 4), 2 is the minor number, and 1 is the bugfix number.

For development versions, the version is something like '4.3-dev3216' where 3216 is the svn revision number for this version of the module. When this development version is first released as a stable release, it will become '4.3.0'. The 4.3 series then enters bugfix mode -- more stable releases in the 4.3 series will be bugfix versions, e.g. 4.3.1, 4.3.2, etc. The main trunk will then become 4.4-dev3377.

Information for Developers

The __version__ attribute for opus_core is set in opus_core/__init__.py, by calling the function opus_core.version_number.version_number. (It seems to be standard practice in subversion-based installations to find this information on the client side rather than changing a file using a pre-commit script.) For development versions, the svn revision number is found using either the svnversion program (Mac/Linux) or SubWCRev from TortoiseSVN (Windows) -- if the program isn't available or the code is missing the svn information, the version for a development version will be e.g. '4.2-dev (revision number not available)'.

Updating Version Numbers

You don't need to do anything to update the development version, since this is read automatically. To change the major, minor, or bugfix version number, or to declare that a release is stable, edit the apropriate definitions in the file opus_core/version_number.py. See How to Make a New Release for further information.