Skip to content

Instantly share code, notes, and snippets.

@shcheklein
Created May 21, 2019 00:48
Show Gist options
  • Save shcheklein/01670d1945bb619ffedf2fc49293c13d to your computer and use it in GitHub Desktop.
Save shcheklein/01670d1945bb619ffedf2fc49293c13d to your computer and use it in GitHub Desktop.
dot.py
who = "DVC TEAM"
def write_dot(self, target, commands, outs, filename):
import networkx
from networkx.drawing.nx_pydot import write_dot
_, edges = self.__build_graph(target, commands, outs)
edges = [edge[::-1] for edge in edges]
simple_g = networkx.DiGraph()
simple_g.add_edges_from(edges)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment