Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • ewoksorange ewoksorange
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • workflow
  • ewoks
  • ewoksorangeewoksorange
  • Merge requests
  • !42

Resolve "Add default widget for tasks that don't have any"

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Wout De Nolf requested to merge 14-add-default-widgets-for-tasks-that-don-t-have-any into main Oct 07, 2021
  • Overview 6
  • Commits 5
  • Pipelines 7
  • Changes 17

Closes #14 (closed)

When executing an Ewoks graph with Orange (pops up the GUI), use a default widget for Ewoks tasks that don't have an Orange widget associated to them.

from ewokscore import Task
from ewokscore import load_graph
from ewokscore.utils import qualname
from ewoksorange.bindings import ewoks_to_ows
from ewoksorange import execute_graph


class Dummy(Task, input_names=["a"], output_names=["b"]):
    def run(self):
        self.outputs.b = self.inputs.a + 1
        print(self.inputs.a, "->", self.outputs.b)


nodes = [
    {
        "id": "task1",
        "task_type": "class",
        "task_identifier": qualname(Dummy),
        "default_inputs": [{"name": "a", "value": 1}],
    },
    {
        "id": "task2",
        "task_type": "class",
        "task_identifier": qualname(Dummy),
    },
]

links = [
    {
        "source": "task1",
        "target": "task2",
        "data_mapping": [{"source_output": "b", "target_input": "a"}],
    }
]

graph = load_graph({"nodes": nodes, "links": links})

ewoks_to_ows(graph, "test.ows")
execute_graph(graph)

image

Edited Oct 08, 2021 by Wout De Nolf
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 14-add-default-widgets-for-tasks-that-don-t-have-any