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.

base_classes

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

get_update_scripts(checked_version=None)[source]

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

run_all_updates(**kwargs)[source]

Upgrade the code to current version.

run_update_script(script_name, **kwargs)[source]

Run one script file.

code_update_manager

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.

run_all_updates()[source]

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

run_update_script(script_name)[source]

Add specific code after every update script.

Subpackages