Create a list of all edges (a, b) which mean that modifying a impacts b with a going over all module and test files.
()
| 618 | |
| 619 | |
| 620 | def create_reverse_dependency_tree() -> List[Tuple[str, str]]: |
| 621 | """ |
| 622 | Create a list of all edges (a, b) which mean that modifying a impacts b with a going over all module and test files. |
| 623 | """ |
| 624 | cache = {} |
| 625 | all_modules = list(PATH_TO_DIFFUSERS.glob("**/*.py")) + list(PATH_TO_TESTS.glob("**/*.py")) |
| 626 | all_modules = [str(mod.relative_to(PATH_TO_REPO)) for mod in all_modules] |
| 627 | edges = [(dep, mod) for mod in all_modules for dep in get_module_dependencies(mod, cache=cache)] |
| 628 | |
| 629 | return list(set(edges)) |
| 630 | |
| 631 | |
| 632 | def get_tree_starting_at(module: str, edges: List[Tuple[str, str]]) -> List[Union[str, List[str]]]: |
no test coverage detected
searching dependent graphs…