Changes for page Extension tvb-ext-xircuits
Last modified by paulapopa on 2023/03/24 08:17
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -33,28 +33,54 @@ 33 33 34 34 === **Step 1. Create a new Xircuits workflow** === 35 35 36 - Usingthe Jupyter Lab launcher.You will noticethat 2 componentsarealready placedinsidethe workflow: theStart and the Finishcomponents.They cannotbe modified or deleted, andtheyrepresent thestarting and finishing pointof theworkflow.36 +From the Jupyter Lab launcher, click on the **Xircuits File** icon, as in the screenshot below. 37 37 38 +[[image:newxircs.png]] 39 + 40 +A new file with the .xircuits extension will be generated under your current working directory. This is where you can start building the workflow diagram interactively. 41 + 42 +[[image:newfile.png]] 43 + 44 +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. 45 + 38 38 === **Step 2. Drag components into the workflow area** === 39 39 40 -Open the components tray, browsethrough thecomponents, selecttheoneyou wisho useanddrag it into theworkflowarea.48 +Open the components tray, from the left-side bar icon highlighted below. 41 41 50 +[[image:tray.png]] 51 + 52 +Now, you can browse through the components, select the one you wish to use, then drag and drop it into the workflow area. 53 + 54 +[[image:components.png]] 55 + 42 42 === **Step 3. Configure the components** === 43 43 44 -The components that are provided in this extensions are configurable, meaning you can set some parameters on almost every component. For this you needtoopenthe//General//tab fromthecomponentstray and dragthe appropriate//literal//:float, int, string,dict,etc.58 +The components that are provided in this extensions are configurable, meaning you can set some parameters on almost every component. Some of the parameters are literals, while some parameters are results of other components. 45 45 60 +In case of primitives you need to open the //General// tab from the components tray and drag the appropriate //literal//: float, int, string, dict, etc. 61 + 62 +The parameters need to be linked to the inputs of the component by dragging and dropping a connection from the output port of a literal/component towards the corresponding input port of the other component (e.g. the gray connections in the screenshot below). 63 + 64 +[[image:diagr.png]] 65 + 46 46 === **Step 4. Make connections** === 47 47 48 -After dragging all your desired components in the workflow area, it's time to connect the components. 68 +After dragging all your desired components/literals in the workflow area, it's time to connect the components. 49 49 50 -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. 70 +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 (e.g. the blue connections in the screenshot below). These connections will dictate the order of execution of the components in your workflow. 51 51 72 +[[image:diagram.png]] 73 + 52 52 === **Step 5. Run the workflow** === 53 53 54 54 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. 55 55 78 +[[image:run.png]] 79 + 56 56 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. 57 57 82 +[[image:out.png]] 83 + 58 58 === **Step 6. Share your work*** === 59 59 60 60 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.