Commit 31927c96 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

graph: dependencies from_gepetto too

parent 0c242d3d
Pipeline #927 passed with stages
in 45 seconds
...@@ -114,7 +114,7 @@ def graph_svg(request): ...@@ -114,7 +114,7 @@ def graph_svg(request):
print('digraph { rankdir=RL;', file=f) print('digraph { rankdir=RL;', file=f)
for project in models.Project.objects.filter(from_gepetto=True): for project in models.Project.objects.filter(from_gepetto=True):
print(f'{{I{project.pk} [label="{project}"];}}', file=f) print(f'{{I{project.pk} [label="{project}"];}}', file=f)
for dep in models.Dependency.objects.all(): for dep in models.Dependency.objects.filter(project__from_gepetto=True, library__from_gepetto=True):
print(f'I{dep.project.pk} -> I{dep.library.pk};', file=f) print(f'I{dep.project.pk} -> I{dep.library.pk};', file=f)
print('}', file=f) print('}', file=f)
svg = run(['dot', '/tmp/graph', '-Tsvg'], stdout=PIPE).stdout.decode() svg = run(['dot', '/tmp/graph', '-Tsvg'], stdout=PIPE).stdout.decode()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment