(repo_path, language, output_path=None, num_commits=None)
| 132 | |
| 133 | |
| 134 | def draw_commit_graph(repo_path, language, output_path=None, num_commits=None): |
| 135 | repo_name = os.path.basename(repo_path) |
| 136 | cg = CommitGraph(repo_path, language) |
| 137 | cg.process(from_beginning=True, num_commits=num_commits) |
| 138 | pr = nx.pagerank(cg.G, alpha=0.85) |
| 139 | write_G_to_dot_with_pr(cg.G, pr, repo_name + ".dot", edge_attrib="func_ids") |
| 140 | subprocess.call('dot -Tsvg {}.dot -o {}.svg'.format(repo_name, repo_name), shell=True) |
| 141 | |
| 142 | def main(): |
| 143 | args = parser.parse_args() |
no test coverage detected