The Virtual Brain Project

Table Of Contents

Previous topic

project_versions Package

Next topic

services Package

This Page

project_update_scripts Package

The convention for adding a new update script is to just add a file starting with the project version at which the script is updating data, followed by ‘_update_project.py’.

To make sure the latest script gets executed, we need to manually change in tvb.basic.config.settings.VersionSettings.PROJECT_VERSION

The update script should have a module level function ‘def update()’ that does the actual updates.

We intentionally break the Pyhon convention in file name (start with a number) to prevent undesired behavior with direct import of these update scripts. They will be used by the manager, through introspection.

1_update_project

Images have been moved inside the project folder. This script only updated the folder/files structure of a project. When executed on a project already stored, an update in DB references might also be needed.

tvb.core.project_versions.project_update_scripts.1_update_project.update(project_path)[source]

Images have been moved in the project folder. An associated db migration will update file paths in the db.

2_update_project

ProjectionRegion DataType has been removed, and ProjectionSurfaces got a new required field.

for release 1.5.1

tvb.core.project_versions.project_update_scripts.2_update_project.update(project_path)[source]

Remove all ProjectionRegion entities before import, to not have problems or missing DT class.