Make ewoksdraw work with any workflow#10
Conversation
| parser.add_argument("workflow", type=str, help="Workflow to save to SVG") | ||
| parser.add_argument( | ||
| "--test", | ||
| help="The 'workflow' argument refers to the name of a test graph.", | ||
| action="store_true", | ||
| ) |
There was a problem hiding this comment.
This part could be imported from ewokscore in the future to handle other representations.
This needs some refactoring in ewokscore to expose the needed utilities.
| from faker import Faker | ||
| from ewokscore import load_graph | ||
| from ewokscore.graph.inputs import _get_all_node_inputs | ||
| from ewokscore.graph.inputs import _get_all_task_output_names |
There was a problem hiding this comment.
Using private members for now. I'll do some refactoring in ewokscore next week to avoid this.
| requires-python = ">=3.9" | ||
| dependencies = [ | ||
| "reportlab", | ||
| "faker", |
There was a problem hiding this comment.
Removed faker and added ewokscore since it is needed to load graphs. To be discussed later if we want to keep it like that or not: #7
a78f1f7 to
2dbd044
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Not really, only workflow representations supported by This goes in the direction of the ewoksjob vs. ewoks inter-dependency which we should avoid if possible: https://github.com/ewoks-kit/ewoksutils/blob/main/src/ewoksutils/cli_utils/cli_submit_utils.py I'm not sure having a rich |
woutdenolf
left a comment
There was a problem hiding this comment.
Some suggestions but looks good otherwise.
If I understand correctly, you rather view I am OK with that. In that case, I'll rework the interface in a follow-up PR to expose Python functions rather than a CLI. |
2dbd044 to
04e04a0
Compare
Indeed. Primary use cases:
|
The current CLI
ewoksdrawgenerates a random workflow before transforming it to SVG.This MR allows to load an arbitrary workflow instead and transform it as SVG. Here is an example with the
demoworkflow ofewokscore:Note: Links are not here since #2 is not done
There is some follow-up to be done as I'll underline in the comments below but I didn't want to bloat the PR too much.