diff options
| author | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 02:28:32 +0100 |
|---|---|---|
| committer | tedin7 <tommasoderosa94@gmail.com> | 2026-11-23 02:28:32 +0100 |
| commit | 372cf42ec2fc3f482fe33b16cec9d09313d4759d (patch) | |
| tree | 6f5fb3a3c280074215e429e48b79efe5109deef1 /tools/progress_dashboard.py | |
| parent | 03b09a086592a197db64d91655c6e65c30764d96 (diff) | |
progress_dashboard: count merged D3D- items from merged PR titles (BUILD-1283)
Diffstat (limited to 'tools/progress_dashboard.py')
| -rw-r--r-- | tools/progress_dashboard.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/tools/progress_dashboard.py b/tools/progress_dashboard.py index ddfddbf3a..d67582c25 100644 --- a/tools/progress_dashboard.py +++ b/tools/progress_dashboard.py | |||
| @@ -720,6 +720,11 @@ def item_ids(title): | |||
| 720 | return out | 720 | return out |
| 721 | 721 | ||
| 722 | 722 | ||
| 723 | def d3d_item_ids(pulls): | ||
| 724 | """D3D- item IDs named by the titles of these pull requests.""" | ||
| 725 | return {i for p in pulls for i in item_ids(p.get("title")) if i.startswith("D3D-")} | ||
| 726 | |||
| 727 | |||
| 723 | def collect_pulls(col, repo, merged, open_prs, limit=PR_LIMIT): | 728 | def collect_pulls(col, repo, merged, open_prs, limit=PR_LIMIT): |
| 724 | """Every pull request into main: merged is IMPLEMENTED, open is PARTIAL; closed without merging is left out. | 729 | """Every pull request into main: merged is IMPLEMENTED, open is PARTIAL; closed without merging is left out. |
| 725 | Grouped by the item family its title names (D3D, SHADER, BUILD, ...).""" | 730 | Grouped by the item family its title names (D3D, SHADER, BUILD, ...).""" |
| @@ -794,7 +799,8 @@ def collect_github(col, repo, login): | |||
| 794 | col.source("github_ci", None, "ok", len(latest)) | 799 | col.source("github_ci", None, "ok", len(latest)) |
| 795 | issue = gh_json(["issue", "view", "313", "-R", repo, "--json", "body,updatedAt"]) | 800 | issue = gh_json(["issue", "view", "313", "-R", repo, "--json", "body,updatedAt"]) |
| 796 | if issue: | 801 | if issue: |
| 797 | n = merged = 0 | 802 | n = 0 |
| 803 | table_ids, table_done = set(), set() | ||
| 798 | for heading, header, rows, _ in md_tables(issue["body"]): | 804 | for heading, header, rows, _ in md_tables(issue["body"]): |
| 799 | h = [plain(x).lower() for x in header] | 805 | h = [plain(x).lower() for x in header] |
| 800 | if h[:1] != ["id"] or "pr" not in h: | 806 | if h[:1] != ["id"] or "pr" not in h: |
| @@ -804,15 +810,20 @@ def collect_github(col, repo, login): | |||
| 804 | continue | 810 | continue |
| 805 | owner, pr, st = plain(row[h.index("owner")]), plain(row[h.index("pr")]), plain(row[h.index("status")]) if "status" in h else "" | 811 | owner, pr, st = plain(row[h.index("owner")]), plain(row[h.index("pr")]), plain(row[h.index("status")]) if "status" in h else "" |
| 806 | status, why = d3d_state(owner, pr, st, merged_set, open_set) | 812 | status, why = d3d_state(owner, pr, st, merged_set, open_set) |
| 807 | merged += status == "implemented" | 813 | table_ids.add(plain(row[0])) |
| 814 | if status == "implemented": | ||
| 815 | table_done.add(plain(row[0])) | ||
| 808 | n += 1 | 816 | n += 1 |
| 809 | col.add(f"d3d.{plain(row[0])}", "d3d12", why, f"{plain(row[0])} {plain(row[1])}"[:120], status, | 817 | col.add(f"d3d.{plain(row[0])}", "d3d12", why, f"{plain(row[0])} {plain(row[1])}"[:120], status, |
| 810 | detail=(st or why)[:200], owner=owner, prs=pr[:120]) | 818 | detail=(st or why)[:200], owner=owner, prs=pr[:120]) |
| 811 | col.source("github_313", None, "ok", n, note=f"issue updated {issue.get('updatedAt')}") | 819 | col.source("github_313", None, "ok", n, note=f"issue updated {issue.get('updatedAt')}") |
| 812 | if n: | 820 | if n: |
| 813 | col.metric("d3d12.merged", "d3d12", "D3D- items merged on main", merged, n, | 821 | # the table lists only items still in progress; a merged item leaves it, so the merges are counted where they are recorded |
| 814 | "items with a PR merged into main (the PR column's word, or the repository's merged list) and no PR " | 822 | pr_done = d3d_item_ids(merged or []) if merged_set is not None else set() |
| 815 | "still open / items") | 823 | pr_any = pr_done | (d3d_item_ids(open_prs) if merged_set is not None else set()) |
| 824 | col.metric("d3d12.merged", "d3d12", "D3D- items merged on main", len(table_done | pr_done), len(table_ids | pr_any), | ||
| 825 | "distinct D3D- IDs named by a merged PR title, plus #313 rows whose PR merged / all known D3D- IDs " | ||
| 826 | "(#313 rows plus IDs named by any merged or open PR title)") | ||
| 816 | coord = gh_json(["issue", "list", "-R", repo, "--state", "open", "--search", "Coordinating who works on what in:title", | 827 | coord = gh_json(["issue", "list", "-R", repo, "--state", "open", "--search", "Coordinating who works on what in:title", |
| 817 | "--json", "number,title,updatedAt"]) | 828 | "--json", "number,title,updatedAt"]) |
| 818 | if coord: | 829 | if coord: |