-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature]: Flat Converter from ewoks execution graph to ELK layout graph #17 #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
LudoBroche
merged 14 commits into
main
from
17-feature-flat-converter-from-ewoks-execution-graph-to-elk-layout-graph
Aug 5, 2026
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9a7fc8a
Issue #17 - Added elk_converter helper and svg_task_group
LudoBroche 3ac7e99
Issue #17 - Adding pyelk graph validation
LudoBroche 1e9f0d4
Issue #17 - Wip Review
LudoBroche d8741fd
Issue #17 - Review
LudoBroche 9794bca
Issue #17 - Review Modification
LudoBroche f439d29
Issue #17 - Rebase Ruff 1.16
LudoBroche 454a7bb
Issue #17 - Adding Pixi to pyproject, mypy errors corected
e6b2828
Issue #17 - Minimal Readme
4c5d6dd
Issue #17 - review in progress
1fe6b76
Update src/ewoksdraw/config/constants.py
LudoBroche dcbbeca
Update CHANGELOG.md
LudoBroche c0d5195
Update .gitignore
LudoBroche 266877e
Issue #17 - Review changes
LudoBroche c027c9a
Issue #17 - Adding definition types
LudoBroche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,7 +16,5 @@ __pycache__/ | |
| .eggs/ | ||
| /doc/_generated | ||
| .svg | ||
|
|
||
| # Pixi | ||
| pixi.toml | ||
| pixi.lock | ||
| # pixi environments | ||
| .pixi/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,14 @@ | ||
| <a href="https://github.com/ewoks-kit/.github/blob/main/shared/CONTRIBUTING.md" target="_blank">CONTRIBUTING.md</a> | ||
| <a href="https://github.com/ewoks-kit/.github/blob/main/shared/CONTRIBUTING.md" target="_blank">CONTRIBUTING.md</a> | ||
|
|
||
| ### Pixi | ||
|
|
||
| ```bash | ||
| pixi install | ||
| pixi update | ||
| pixi run test | ||
| pixi run test-lowest | ||
| pixi run lint | ||
| pixi run typecheck | ||
| pixi run full-ci | ||
| pixi run graph-to-svg acyclic1 | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| from pprint import pprint | ||
|
|
||
| from ewokscore import load_graph | ||
| from ewokscore.tests.examples.graphs import get_graph | ||
|
|
||
| from ewoksdraw import build_svg_task_group | ||
| from ewoksdraw.layout.elk_converter import ElkGraph | ||
| from ewoksdraw.layout.elk_converter import convert_ewoks_to_elk_graph | ||
| from ewoksdraw.svg.svg_task_group import SvgTaskGroup | ||
| from ewoksdraw.svg.svg_task_group import TaskSizes | ||
|
|
||
| graph_description, _ = get_graph("acyclic1") | ||
| ewoks_graph = load_graph(graph_description) | ||
|
|
||
| svg_task_group: SvgTaskGroup = build_svg_task_group(ewoks_graph) | ||
| task_sizes: TaskSizes = svg_task_group.extract_task_sizes() | ||
| elk_graph: ElkGraph = convert_ewoks_to_elk_graph(ewoks_graph, task_sizes) | ||
|
|
||
| pprint(dict(ewoks_graph.graph.nodes(data=True))) | ||
| pprint(list(ewoks_graph.graph.edges(data=True))) | ||
| pprint(task_sizes) | ||
| pprint(elk_graph) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import argparse | ||
| from pathlib import Path | ||
|
|
||
| from ewokscore import load_graph | ||
| from ewokscore.tests.examples.graphs import get_graph | ||
|
|
||
| from ewoksdraw import graph_to_svg | ||
|
|
||
| parser = argparse.ArgumentParser() | ||
| parser.add_argument("workflow", nargs="?", default="acyclic1") | ||
| args = parser.parse_args() | ||
|
|
||
| graph_description, _ = get_graph(args.workflow) | ||
| graph = load_graph(graph_description) | ||
| output_path = Path("examples") / f"{args.workflow}.svg" | ||
| graph_to_svg(graph, output_path) | ||
| print(f"Wrote {output_path}") |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.