code_versions Package

This package contains update scripts to account for changes between different TVB releases that don’t fall in either a database change or file storage change categories.

E.G. Adding new events on create project hookpoint.


exception tvb.core.code_versions.base_classes.InvalidUpgradeScriptException(message, parent_exception=None)[source]

Bases: TVBException

Raised in case an update script is present but does not comply to TVB conventions.

class tvb.core.code_versions.base_classes.UpdateManager(module_scripts, check_version, current_version)[source]

Bases: object

An update manager pattern. Goes through all the scripts, and based on the current version executed the one in need


Return all update scripts that need to be executed in order to bring code up to date.


Upgrade the code to current version.

run_update_script(script_name, **kwargs)[source]

Run one script file.


class tvb.core.code_versions.code_update_manager.CodeUpdateManager[source]

Bases: UpdateManager

A manager that goes through all the scripts that are newer than the version number written in the .tvb.basic.config.setting configuration file.


Upgrade the code to current version. Go through all update scripts with lower SVN version than the current running version.


Add specific code after every update script.