Extension tvb-ext-xircuits

Version 13.1 by rominabaila on 2022/11/16 11:38

Source code: https://github.com/the-virtual-brain/tvb-ext-xircuits

Jupyter Lab Extension for building and executing EBRAINS Workflows

Purpose

This is a Jupyter Lab extension with the role of offering graphical support for EBRAINS workflows. It allows users to utilize all the TVB and EBRAINS capabilities, while drastically reducing the complexity of configuring them inside a Jupyter Lab environmen.

Note: This extension is still a WIP (Work In Progress).

Installation

The extension can installed using the official PyPi distribution (https://pypi.org/project/tvb-ext-xircuits/):

pip install tvb-ext-xircuits

After installing the extension and opening a Jupyter Lab session, you should be able to see in the left panel of Jupyter Lab a new icon, which represents the Xircuits components tray:

image-20221116115659-2.png

Usage

Step 1. Create a new Xircuits workflow

Using the Jupyter Lab launcher. You will notice that 2 components are already placed inside the workflow: the Start and the Finish components. They cannot be modified or deleted, and they represent the starting and finishing point of the workflow.

Step 2.  Drag components into the workflow area

Open the components tray, browse through the components, select the one you wish to use and drag it into the workflow area.

Step 3. Configure the components

The components that are provided in this extensions are configurable, meaning you can set some parameters on almost every component. For this  you need to open the General tab from the components tray and drag the appropriate literal: float, int, string, dict, etc.

Step 4. Make connections

After dragging all your desired components in the workflow area, it's time to connect the components.

First, link the Start node to the first component of your workflow. Then make the connections between all your components. The last component should be linked to the Finish node, to indicate the end of your workflow.

Step 5. Run the workflow

After connecting everything, you need to run the workflow to actually see its result. For this you can click on the Run button (▶), which will also implicitly compile the workflow.

After clicking on Run, a new Jupyter Output window should appear in the bottom of your Jupyter Lab environment. Here you will see the output of your workflow, such as logs, static plots, etc.

Step 6. Share your work*

This step is, of course, optional, but it is worth mentioning that sharing your workflows with others is extremely easy. By just saving and sharing your workflow (*.xircuits) file, anyone can access the entire workflow, see the exact connections that you made and receive the same configuration for the components.

 

Public

TVB Widgets