From 13c55af160dd68ef6e570e6521151c9e002c0119 Mon Sep 17 00:00:00 2001 From: Francisco Gindre Date: Thu, 16 Jun 2022 14:54:14 -0300 Subject: [PATCH 1/6] [#17] Create Android and iOS specific views of the Wallet DAG Closes #17 This adds two new views of the Wallet DAG: `ios` and `android`. They focus only on the repos directly related to those platforms proving a more concise DAG that is more suitable for platform focused tasks such as backlog grooming or sprint planning. This commit also adds respective gh-pages.yml tasks, template scripts for users building the DAGs locally and a `README.md` update. Add `href` tags for Android and iOS DAGs turn on `SHOW_MILESTONES` for Wallet DAG PR Suggestions --- .github/workflows/gh-pages.yml | 17 +++++++++++++++++ README.md | 2 ++ index.html | 2 ++ template_scripts/generate_schemas.sh | 12 ++++++++++++ template_scripts/generate_wallet_android_dag.sh | 7 +++++++ template_scripts/generate_wallet_dag.sh | 7 +++++++ template_scripts/generate_wallet_ios_dag.sh | 7 +++++++ 7 files changed, 54 insertions(+) create mode 100644 template_scripts/generate_schemas.sh create mode 100644 template_scripts/generate_wallet_android_dag.sh create mode 100644 template_scripts/generate_wallet_dag.sh create mode 100644 template_scripts/generate_wallet_ios_dag.sh diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 638ea53c..7b7b5224 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -66,6 +66,23 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ZENHUB_TOKEN: ${{ secrets.ZENHUB_TOKEN }} DAG_VIEW: wallet + SHOW_MILESTONES: true + + - name: Render ECC iOS Wallet DAG + run: python3 ./zcash-issue-dag.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ZENHUB_TOKEN: ${{ secrets.ZENHUB_TOKEN }} + DAG_VIEW: wallet-ios + SHOW_MILESTONES: true + + - name: Render ECC Android Wallet DAG + run: python3 ./zcash-issue-dag.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + ZENHUB_TOKEN: ${{ secrets.ZENHUB_TOKEN }} + DAG_VIEW: wallet-android + SHOW_MILESTONES: true - name: Render ZF DAG run: python3 ./zcash-issue-dag.py diff --git a/README.md b/README.md index 93fd9259..0e6e7714 100644 --- a/README.md +++ b/README.md @@ -55,4 +55,6 @@ ZENHUB_TOKEN= \ poetry run python ./zcash-issue-dag.py ``` +You can find a series of template script files inside the folder `template_scripts`. + diff --git a/index.html b/index.html index 174322b8..60488abb 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,8 @@

Currently this is just hosting DAGs showing dependencies between issues and PRs, for several Zcash teams.

ECC core team DAG

ECC wallet team DAG

+

ECC wallet team Android DAG

+

ECC wallet team iOS DAG

ZF DAG

Halo2-focused DAG

diff --git a/template_scripts/generate_schemas.sh b/template_scripts/generate_schemas.sh new file mode 100644 index 00000000..6331749f --- /dev/null +++ b/template_scripts/generate_schemas.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python3 -m sgqlc.introspection \ + --exclude-deprecated \ + --exclude-description \ + -H "Authorization: bearer $GITHUB_TOKEN" \ + https://api.github.com/graphql \ + github_schema.json + +poetry run sgqlc-codegen schema github_schema.json github_schema.py diff --git a/template_scripts/generate_wallet_android_dag.sh b/template_scripts/generate_wallet_android_dag.sh new file mode 100644 index 00000000..5b3c9352 --- /dev/null +++ b/template_scripts/generate_wallet_android_dag.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +DAG_VIEW=wallet-android \ +SHOW_MILESTONES=true \ +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python ./zcash-issue-dag.py diff --git a/template_scripts/generate_wallet_dag.sh b/template_scripts/generate_wallet_dag.sh new file mode 100644 index 00000000..9f95b65a --- /dev/null +++ b/template_scripts/generate_wallet_dag.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +DAG_VIEW=wallet \ +SHOW_MILESTONES=true \ +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python ./zcash-issue-dag.py diff --git a/template_scripts/generate_wallet_ios_dag.sh b/template_scripts/generate_wallet_ios_dag.sh new file mode 100644 index 00000000..868f0e1d --- /dev/null +++ b/template_scripts/generate_wallet_ios_dag.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +DAG_VIEW=wallet-ios \ +SHOW_MILESTONES=true \ +#GITHUB_TOKEN= \ +#ZENHUB_TOKEN= \ +poetry run python ./zcash-issue-dag.py From 4ab70b9366f2a8dbcb004af3b7e851bc4c7e8ee1 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 4 May 2022 17:51:38 +0100 Subject: [PATCH 2/6] Improve visibility of milestone box in dark mode --- public/zcash-dag.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/zcash-dag.css b/public/zcash-dag.css index 228f85bd..ed020bb3 100644 --- a/public/zcash-dag.css +++ b/public/zcash-dag.css @@ -3,6 +3,12 @@ /* Material dark theme surface colour */ fill: #121212; } + svg .cluster polygon { + stroke: #1976d2; + } + svg .cluster text { + fill: #c9d1d9; + } svg .node polygon { stroke: #c9d1d9; } From a35db456953f6de0b47574834c47cdb90ebbb1f8 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 19 Jan 2023 04:10:27 +0000 Subject: [PATCH 3/6] Number clusters individually to avoid collisions This fixes a bug where enabling epics and milestones together will cause their subgraph boxes to be merged. --- zcash-issue-dag.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/zcash-issue-dag.py b/zcash-issue-dag.py index 72013283..c51a4b39 100755 --- a/zcash-issue-dag.py +++ b/zcash-issue-dag.py @@ -324,20 +324,23 @@ def main(): ag = nx.nx_agraph.to_agraph(dg) + clusters = 0 if SHOW_MILESTONES: # Identify milestone nbunches milestones = {n.milestone: [] for n in dg} for m in milestones: milestones[m] = [n for n in dg if n.milestone == m] del milestones[None] - for (i, (milestone, nodes)) in enumerate(milestones.items()): - ag.add_subgraph(nodes, 'cluster_%d' % i, label=milestone, color='blue') + for (milestone, nodes) in milestones.items(): + ag.add_subgraph(nodes, 'cluster_%d' % clusters, label=milestone, color='blue') + clusters += 1 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] 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! ag.graph_attr['rankdir'] = 'LR' From 3cbca7064537ec4417196b041447334490a67a10 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Mon, 23 Jan 2023 21:00:54 +0000 Subject: [PATCH 4/6] Highlight nodes with S-waiting-on-review label --- public/zcash-dag.css | 3 +++ zcash-issue-dag.py | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/public/zcash-dag.css b/public/zcash-dag.css index ed020bb3..4df47224 100644 --- a/public/zcash-dag.css +++ b/public/zcash-dag.css @@ -20,6 +20,9 @@ /* Material Blue 700 */ fill: #1976d2; } + svg .node.needs-review polygon { + fill: #d29b19; + } svg .node.closed polygon { fill: #cf6b66; } diff --git a/zcash-issue-dag.py b/zcash-issue-dag.py index c51a4b39..b32d6683 100755 --- a/zcash-issue-dag.py +++ b/zcash-issue-dag.py @@ -103,6 +103,7 @@ class GitHubIssue: self.title = data['title'] self.is_pr = 'merged' in data self.is_committed = 'S-committed' in labels + self.waiting_on_review = 'S-waiting-on-review' in labels self.url = data['url'] self.state = 'closed' if data['state'] in ['CLOSED', 'MERGED'] else 'open' if 'milestone' in data and data['milestone']: @@ -309,6 +310,9 @@ def main(): if n.state == 'closed': attrs['class'] = 'closed' attrs['fillcolor'] = '#fad8c7' + elif n.waiting_on_review: + attrs['class'] = 'needs-review' + attrs['fillcolor'] = '#dfc150' elif n.is_committed: attrs['class'] = 'committed' attrs['fillcolor'] = '#a6cfff' From 0869e644d213ee094472308351ea6e90ecd6f926 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Thu, 9 Mar 2023 08:38:33 -0700 Subject: [PATCH 5/6] Switch to using the milestone DAG in automated builds. The zcashd core dag is a bit crowded and hard to interpret without the milestones view enabled. --- .github/workflows/gh-pages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 7b7b5224..2c6f457b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -59,6 +59,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ZENHUB_TOKEN: ${{ secrets.ZENHUB_TOKEN }} + SHOW_MILESTONES: true - name: Render ECC wallet DAG run: python3 ./zcash-issue-dag.py From 7a76736ec4e0d309eba39b9c8447bf12825332b5 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Thu, 20 Apr 2023 17:54:18 +0100 Subject: [PATCH 6/6] Fix CI --- .github/workflows/gh-pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 2c6f457b..20583faf 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -10,9 +10,9 @@ on: jobs: deploy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python uses: actions/setup-python@v2