MCPcopy Create free account
hub / github.com/Kitware/VTK / MakeModuleTree

Function MakeModuleTree

Utilities/Maintenance/VisualizeModuleDependencies.py:130–142  ·  view source on GitHub ↗

For a given module make a tree with the module as the root and the dependent modules as children.

(module, index, tree, moduleDependencies, treeDepth, level=0)

Source from the content-addressed store, hash-verified

128 return foundModules
129
130def MakeModuleTree(module, index, tree, moduleDependencies, treeDepth, level=0):
131 '''
132 For a given module make a tree with the module as the root and the
133 dependent modules as children.
134 '''
135 if module:
136 index = index + [module]
137 if treeDepth == 0 or level < treeDepth:
138 for m in moduleDependencies[module]:
139 level += 1
140 MakeModuleTree(m, index, tree, moduleDependencies, treeDepth, level)
141 level -= 1
142 Add(tree, index)
143
144# One-line Tree in Python
145# See: https:gist.github.com/hrldcpr/2012250

Callers 1

GenerateGraphFunction · 0.85

Calls 1

AddFunction · 0.70

Tested by

no test coverage detected