OLD | NEW |
1 # Copyright 2016 The LUCI Authors. All rights reserved. | 1 # Copyright 2016 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
4 | 4 |
5 from __future__ import print_function | 5 from __future__ import print_function |
6 | 6 |
7 import sys | |
8 import os | |
9 import collections | |
10 | |
11 from . import loader | 7 from . import loader |
12 | 8 |
13 | 9 |
14 _GRAPH_HEADER = """strict digraph { | 10 _GRAPH_HEADER = """strict digraph { |
15 concentrate = true; | 11 concentrate = true; |
16 ranksep = 2; | 12 ranksep = 2; |
17 nodesep = 0.25; | 13 nodesep = 0.25; |
18 """ | 14 """ |
19 | 15 |
20 _GRAPH_FOOTER = """} | 16 _GRAPH_FOOTER = """} |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 print(' subgraph "cluster_%s" { label="%s"; %s; }' % ( | 105 print(' subgraph "cluster_%s" { label="%s"; %s; }' % ( |
110 package, package, '; '.join(modules)), file=stdout) | 106 package, package, '; '.join(modules)), file=stdout) |
111 | 107 |
112 if recipe_filter and recipe_to_package: | 108 if recipe_filter and recipe_to_package: |
113 recipe_names = [ | 109 recipe_names = [ |
114 '"recipe %s"' % name for name in recipe_to_package.keys()] | 110 '"recipe %s"' % name for name in recipe_to_package.keys()] |
115 print(' subgraph "cluster_recipes" { label="recipes"; %s; }' % ( | 111 print(' subgraph "cluster_recipes" { label="recipes"; %s; }' % ( |
116 '; '.join(recipe_names)), file=stdout) | 112 '; '.join(recipe_names)), file=stdout) |
117 | 113 |
118 print(_GRAPH_FOOTER, file=stdout) | 114 print(_GRAPH_FOOTER, file=stdout) |
OLD | NEW |