Skip to content

Resolve "Allow ewoks widgets to be connected to orange widgets"

Closes #7 (closed)

This MR is about using native Orange widgets in Ewoks.

There are three ways to execute an Orange workflow:

  1. Convert it to an ewoks workflow and run it like any other ewoks workflow (no GUI)

    • Ewoks widgets: the corresponding tasks will be used (no Qt dependency)
    • Native Orange widgets: a task class will be created on-the-fly to wrap and "execute" the widget (Qt dependency)

    The run method of the task wrapper does the following:

    • instantiate the widget with a local signal manager SignalManagerWithoutScheme
    • set the inputs and settings of the widget (dereference Variable inputs as native widgets cannot handle them)
    • call handleNewSignals on the widget which results in calls to OWWidget.send which send output data to the signal manager
    • wait for and retrieve the output from the local signal manager SignalManagerWithoutScheme
  2. Keep the widgets and use qt signaling like the Orange canvas would do (no GUI, meant for the test suite)

    • OrangeCanvasHandler is used to emulate what the Orange canvas is doing but then without the GUI.
    • SignalManagerWithScheme is used to capture the output of the widget and dereference Variable inputs for native widgets.
  3. Use the Orange canvas (with GUI)

    • SignalManagerWithScheme is used to capture the output of the widget and dereference Variable inputs for native widgets.

For use cases 2 and 3 we need to replace the signal manager class in Orange (done when importing ewoksorange):

from ewoksorange.bindings.owsignal_manager import patch_signal_manager
patch_signal_manager()

To enforce signal manager patching in use case 3, the Orange canvas needs to be launched like this

python -m ewoksorange.canvas
Edited by Wout De Nolf

Merge request reports