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
feat(cli): add renku workflow visualize #2372
Conversation
f7abb2c
to
b1e4ad9
Compare
As much as I hate to admit it, this is pretty cool 😆 A couple of things I noticed:
|
331f75b
to
c8755a3
Compare
👍
What do you mean they change between each set of nodes? Each edge gets a unique color so there's no confusion if there's overlapping edges. Or you mean the colors change between executions of the visualize command? That I could fix.
That's a good idea.
This command visualizes activities, which don't have names. The only place where visualizing a Plan (which has a name) would make sense is for CompositePlans, but those don't have Activities. |
73cd33a
to
8df41b9
Compare
Thanks @Panaetius!
One final point - this seems like a fantastic starting point to have a less obtuse way to create pngs as well. We should probably make a follow-up issue to replace the old rdf2dot functionality? Or do you want to use some other library? |
Yes, I originally wanted to add dot output to this PR but then decided a follow-up issue is better, just haven't created it yet. I added one now: #2376 For colors, well, it's difficult, since the File nodes and Activity nodes are just independent nodes after layout/when coloring is done. And the edges are independent of the nodes at this point (they just have the correct coordinates so printing them works out). It also makes assigning colors more difficult, as currently I can just check if an edge overlaps and has the same color, then assign a different color, but with nodes I would have to check if any edges of a node overlap with any edges of another node and change the color of the edges for the node, which could cause a conflict with some other node and edge that didn't have a conflict before. visualizing plans: This uses mostly the same logic as rerun, it just gets activity chains between paths and at no point are Plans involved in the calculation of the graph (other then for getting the executed command for display purposes). |
(edited) re: colors - it would be fine if we do it as a follow-up, but I think on bigger visualizations showing all edges of a step in the same color will make it much easier to parse what's going on. re: plans vs activities
afaict none of the commands except for As for your question about what I would expect in the composite plan - I think in your example it's clear that the user would want to see the two steps linked, i.e. flow from A --> B irrespective if this had been executed or not (indeed, the |
maybe it's just a matter of the current |
8df41b9
to
33bf6d9
Compare
But maybe you're right and it's in the wrong place. We also have I agree the current way of organizing the commands isn't the best, but I'm not sure what the best way would be in terms of the trade-off between complexity and being clear. And follow-up for the colors: #2377 |
e409d07
to
32cec04
Compare
2b2a16a
to
e2b57d6
Compare
@rokroskar all done. It now shows help by default. |
Great thanks @Panaetius - I think |
I've tried this out now also with the |
Hi! This is really cool! I ran into some errors but I think they're due to space issues on my screen (however my monitor is quite big, 26in). I'm running I was just running random things so if the things I ran weren't expected, ignore them.
Traceback (most recent call last):
I got the same error with all the following commands:
It might have to do with mixing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
it felt like reviewing an old DOS game rather than renku code 🙃
@gavin-k-lee what was your terminal size....? |
FWIW:
|
…Center/renku-python into 2131-workflow-visualize
Should be fixed now. @gavin-k-lee |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! The aforementioned bugs seem to be resolved. I especially like the 'full command' info in the interactive mode because that's something the commit messages when doing renku commands have necessarily needed to be cut short.
It'll still be cut off if the command doesn't fit in the popup window. We might want to add scrolling to the popup as well but the UX around that isn't clear to me. I think for now it's good enough |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adds new command
renku workflow visualize
with options:: limit activity graph to activity chains ending in
--from : limit activity graph to activity chains starting at (allows multiple)
--columns: Columns to show in graph, valid columns are
command
,id
,date
--hide-files: only show activities, not inputs/outputs
--ascii: don't use unicode box characters for display, only ascii characters
--no-color: don't colorize output
--no-pager: don't use
less
pager, print to stdout directly--interactive: Enter interactive mode, use arrow keys to navigate, press enter to show details of highlighted activity
For help, see
renku workflow visualize --help
.Example usage
closes #2131