MCPcopy Create free account
hub / github.com/Persper/code-analytics / draw_commit_graph

Function draw_commit_graph

persper/graphs/commit_graph.py:134–140  ·  view source on GitHub ↗
(repo_path, language, output_path=None, num_commits=None)

Source from the content-addressed store, hash-verified

132
133
134def 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
142def main():
143 args = parser.parse_args()

Callers 1

mainFunction · 0.85

Calls 3

write_G_to_dot_with_prFunction · 0.90
CommitGraphClass · 0.85
processMethod · 0.45

Tested by

no test coverage detected