The Virtual Brain Project

Table Of Contents

Previous topic

neotraits Package

Next topic

project_versions Package

This Page

portlets Package


class tvb.core.portlets.portlet_configurer.PortletConfigurer(portlet_entity)[source]

Bases: builtins.object

Helper class that handles all the functionality required from a portlet. Given a portlet entity, this will allow the following:

  • return a configurable interface in the form of a dictionary

    equivalent to the input tree of an adapter

  • create a new PortletConfiguration entity, or update a already

    created one with a new set of parameters


Unique identifier for current portlet.

static build_adapter_from_declaration(adapter_declaration)[source]

Build and adapter from the declaration in the portlets xml.

static clear_data_for_portlet(stored_portlet)[source]

Remove any reference towards a given portlet already selected in a BurstConfiguration.


Create a PortletConfiguration entity with the default values from the portlet XML declaration and the adapter input trees.


Given an algorithm identifier, go trough the adapter chain, and merge their input tree with the declared overwrites

log = <Logger tvb.core.portlets.portlet_configurer (INFO)>

Portlet DB identifier


Prepend separate prefix to the name of each entry of the adapter interfaces.

Parameters:adapter_config_list – a list of AdapterConfiguration entities.
Returns:same list with the difference that a separate prefix is prepended to the name of each parameter from the adapter interface, specific to the step it is in the adapter chain.

Portlet name to be displayed in UI

static update_default_values(portlet_interface, portlet_configuration)[source]
  • portlet_interface – a list of AdapterConfiguration entities.
  • portlet_configuration – a PortletConfiguration entity.

Update the defaults from each AdapterConfiguration entity with the values stored in the corresponding workflow step held in the PortletConfiguration entity.

static update_portlet_configuration(portlet_configuration, submited_parameters)[source]
  • portlet_configuration – the portlet configuration that need to be updated
  • submited_parameters – a list of parameters as submitted from the UI. This All names are prefixed with adapter specific generated prefix.


class tvb.core.portlets.xml_reader.PortletWrapper[source]

Bases: builtins.object

Transient model class, used for passing data when reading from XML into portlets memory


Return only inputs dictionary


Convert into the expected UI tree

class tvb.core.portlets.xml_reader.XMLPortletReader(interface_file)[source]

Bases: builtins.object

Helper class to read from XML, a group of Portlets definition.


Return the list of outputs for a given algorithm


Retrieve the dictionary of available sub-Algorithm references.


Return the interface Tree for a single sub-algorithm

logger = <Logger tvb.core.portlets.xml_reader (INFO)>