zifeo / whiz

Modern DAG/tasks runner for multi-platform monorepos with live reloading, env management, pipes, and more in a tabbed view.
https://metatype.dev/docs/reference/ecosystem?utm_source=github&utm_medium=about&utm_campaign=whiz
Mozilla Public License 2.0
19 stars 14 forks source link

Viz/graph of tasks #100

Closed zifeo closed 10 months ago

zifeo commented 10 months ago

whiz --graph should output an ascii visualisation of the tasks and their dependency. Format is free but should support large graphs.

Darioazzali commented 10 months ago

Have a working solution here. Possibility to view the graph with box-character as well. For now I've just made a binary crate that parse yaml file from command line and generate the correspondent graph. The file has a structure similar from the resolved whiz tasks dependency list in main function:

task_1:
   depends_on:
       - other_task
       - antother_task
task_2:
    depends_on: []
#...

In the upper bar there are the tasks that haven't dependency with the others, in the bottom you have the dependent tasks graph.

task_graph I've also made a function for generate casual big dag for checking the representation. I've used a binary crates that helps draw from nodes and edges lists termgraph. There are others solution that I've found :