mirror of https://github.com/zcash/developers.git
Merge pull request #23 from zcash/fix-epic-milestone-interaction
Number clusters individually to avoid collisions
This commit is contained in:
commit
be5b6e694d
|
@ -324,20 +324,23 @@ def main():
|
||||||
|
|
||||||
ag = nx.nx_agraph.to_agraph(dg)
|
ag = nx.nx_agraph.to_agraph(dg)
|
||||||
|
|
||||||
|
clusters = 0
|
||||||
if SHOW_MILESTONES:
|
if SHOW_MILESTONES:
|
||||||
# Identify milestone nbunches
|
# Identify milestone nbunches
|
||||||
milestones = {n.milestone: [] for n in dg}
|
milestones = {n.milestone: [] for n in dg}
|
||||||
for m in milestones:
|
for m in milestones:
|
||||||
milestones[m] = [n for n in dg if n.milestone == m]
|
milestones[m] = [n for n in dg if n.milestone == m]
|
||||||
del milestones[None]
|
del milestones[None]
|
||||||
for (i, (milestone, nodes)) in enumerate(milestones.items()):
|
for (milestone, nodes) in milestones.items():
|
||||||
ag.add_subgraph(nodes, 'cluster_%d' % i, label=milestone, color='blue')
|
ag.add_subgraph(nodes, 'cluster_%d' % clusters, label=milestone, color='blue')
|
||||||
|
clusters += 1
|
||||||
|
|
||||||
if SHOW_EPICS:
|
if SHOW_EPICS:
|
||||||
for (i, (epic, issues)) in enumerate(issues_by_epic.items()):
|
for (epic, issues) in issues_by_epic.items():
|
||||||
issues = [n for n in dg if (n.repo_id, n.issue_number) in issues]
|
issues = [n for n in dg if (n.repo_id, n.issue_number) in issues]
|
||||||
if issues:
|
if issues:
|
||||||
ag.add_subgraph(issues, 'cluster_%d' % i, label=epic.title, color='blue')
|
ag.add_subgraph(issues, 'cluster_%d' % clusters, label=epic.title, color='blue')
|
||||||
|
clusters += 1
|
||||||
|
|
||||||
# Draw the result!
|
# Draw the result!
|
||||||
ag.graph_attr['rankdir'] = 'LR'
|
ag.graph_attr['rankdir'] = 'LR'
|
||||||
|
|
Loading…
Reference in New Issue