RubiNotebook is a feature within Code Fusion on the Rubiscape platform where you can write your code in the Python programming language for building models. Unlike RubiPython, in RubiNotebook, you can execute the Python code and see the output in the application itself. The RubiNotebook has similar functionality as that of Jupyter Notebook.

You can connect multiple predecessors or preceding tasks to a single RubiNotebook node. Each predecessor task and all the columns present in the task appear in the RubiNotebook configuration page. You can differentiate each predecessor task and its columns by their names on the page. It is useful when you have large data to combine or split and perform different actions on it.

Writing Custom Code using RubiNotebook

To write your custom code using RubiNotebook, follow the steps given below.

  1. Create your algorithm flow. Refer to Building Algorithm Flow in a Workbook Canvas.
  2. Drag and drop RubiNotebook on your workbook canvas.

  3. Connect RubiNotebook to the required node in your algorithm flow.
  4. Select RubiNotebook and in the Properties pane, enter the jupyter URL and then click Configure


    The RubiNotebook configuration page is displayed.

    (info)

    Note:

    The features in the above table can be used while running the entire node only. These features cannot be used while running individual cells of the Python program in the RubiNotebook editor.

  5. Enter the Python code in the RubiNotebook code editor to perform various operations on the predecessor node.
    The RubiNotebook code editor is shown in the figure given below.

    The fields/icons on the RubiNotebook code editor are described in the table below.

    Field

    Description

    File

    It allows you to download python file (.py), python notebook (.ipynb), html file (.html), upload files, objects and notebooks 

    It helps you to Insert a new cell below the selected cell.

     

    It helps you to Cut the selected cell.

    It helps you to Copy the selected cell.

    It helps you to Paste the copied or cut cell into the selected cell.

    It helps you to execute the Python program.

    It helps you to interrupt the kernel. The kernel resumes work when you start the execution of the program again.

    It helps you to restart the kernel when it is shut down.

    It helps you to restart the kernel and re-run the notebook.

    Code cells– it allows you to write and edit new codes.

    Markdown- It allows you to format a text. It also documents the computational process in a literal way.

    Raw cells – It provides a place where we can write output directly.

  6. Click Run to execute the code.
    After successful execution, the output is displayed.
  7. After completing, click Close to close the RubiNotebook page and return to the workbook page.

(info)

Notes:

  • To execute the code in the RubiNotebook, the Kernel Status must be Connected.
  • The RubiNotebook gives all the standard Python errors in case of any errors in programming.

Table of Contents