Return all root nodes - that is, nodes with no dependencies inside their app. These are the starting point for an app.
(self, app=None)
| 240 | return visited |
| 241 | |
| 242 | def root_nodes(self, app=None): |
| 243 | """ |
| 244 | Return all root nodes - that is, nodes with no dependencies inside |
| 245 | their app. These are the starting point for an app. |
| 246 | """ |
| 247 | roots = set() |
| 248 | for node in self.nodes: |
| 249 | if all(key[0] != node[0] for key in self.node_map[node].parents) and ( |
| 250 | not app or app == node[0] |
| 251 | ): |
| 252 | roots.add(node) |
| 253 | return sorted(roots) |
| 254 | |
| 255 | def leaf_nodes(self, app=None): |
| 256 | """ |