Skip to content

[Feature]: Flat Converter from ewoks execution graph to ELK layout graph #17

Description

@LudoBroche

Tip

The Feature

  • As a: developer working on the ewoksdraw pipeline
  • I want to: convert a flat ewoks workflow graph (execution representation) into an ELK graph (layout representation)
  • So that: I can pass the structurally correct graph to our custom ELKpython library to automatically compute task and link positions for SVG rendering.

Note

Context & Architecture
The converter must bridge two distinct graph representations:

  1. ewoks Graph (Execution/Workflow)
    • Backend: NetworkX DiGraph (ewokscore.graph.TaskGraph).
    • Format: Based on NetworkX node-link JSON, with workflow semantics (nodes with task_identifier, links with data_mapping).
  2. ELK Graph (Layout)
    • Format: ELK JSON graph format (Eclipse/ELK standard).
    • Structure: Uses children (nodes with width/height), edges (sources to targets), and ports.
    • Purpose: Strict layout orientation. After computation, ELK injects x, y, width, height, and edge routing sections.

Note

Scope & Boundaries

  • In Scope: Parsing the standard ewoks workflow graph structure from its NetworkX backbone.
    • Mapping ewoks nodes to ELK children, providing default width/height bounding boxes required for the solver.
    • Mapping ewoks links to ELK edges.
    • Handling subworkflows as simple, opaque tasks (flat representation only).
  • Out of Scope: Expanding or routing into nested subworkflows/compound nodes (to be handled in a future issue)
    • Executing the actual layout computation (calling the ELK solver).
    • Rendering the final SVG.

Important

Acceptance Criteria
The feature is considered complete and ready to ship when:

  • A conversion function or class is implemented to map ewoks NetworkX representations to valid ELK JSON dictionary structures.
  • All subworkflows are treated as simple, single-level nodes without hierarchical expansion.
  • ELK children are successfully initialized with the required dimension attributes (width, height) needed by the ELK solver.
  • ewoks dependencies (links) are accurately translated to ELK edges matching the correct source and target nodes.
  • Unit tests validate the successful translation using sample ewoks JSON payloads against the expected ELK JSON schema.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions