Project Versioning

The Project class implements a light versioning system by storing version metadata in the manifest's content property. Projects versions are maintained as a list of dicts. Each dict has the following properties:

  • version_date: A timestamp string with the format %Y%m%d%H%M%S.
  • version_number: An integer.
  • version_name: A string consisting of the timestamp, version number, and manifest name. See below for the method construction.
  • version_workflow: A string with the name of folder containing the templates used by the project version. The format must be lower case alphanumeric characters with words separated by -. If there is no workflow, it may be None (translating to Null in JSON). See below naming workflow versions.
  • version_zipfile: A binary zip archive containing a datapackage of the project version.

The version_name is formed by concatenating the version_date, the version_number, and the manifest name, separated by _. The version_number should be preceded by v. An example is 20190131122714_v1_nyt_humanities.

A typical version dict would look like this:

{
    'version_date': '20190131122714',
    'version_name': '20190131122714_v1_nyt_humanities',
    'version_number': 2,
    'version_workflow': 'topic-modeling',
    'version_zipfile': <datapackage>
}

Since templates may be revised, it is recommended that template folder names also indicate version numbers like topic-modeling_v2.