Skip to content

Commit

Permalink
Merge pull request #4 from ZcashFoundation/fix-ci-sync-fork
Browse files Browse the repository at this point in the history
Fix CI by syncing fork
  • Loading branch information
conradoplg authored May 3, 2023
2 parents 7cd228f + 8d1ee20 commit 8e09c2f
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ ZENHUB_TOKEN=<INSERT> \
poetry run python ./zcash-issue-dag.py
```

You can find a series of template script files inside the folder `template_scripts`.


2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ <h1>Zcash Foundation DAGs</h1>
</footer>
</body>

</html>
</html>
9 changes: 9 additions & 0 deletions public/zcash-dag.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -14,6 +20,9 @@
/* Material Blue 700 */
fill: #1976d2;
}
svg .node.needs-review polygon {
fill: #d29b19;
}
svg .node.closed polygon {
fill: #cf6b66;
}
Expand Down
12 changes: 12 additions & 0 deletions template_scripts/generate_schemas.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

#GITHUB_TOKEN=<INSERT> \
#ZENHUB_TOKEN=<INSERT> \
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
7 changes: 7 additions & 0 deletions template_scripts/generate_wallet_android_dag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

DAG_VIEW=wallet-android \
SHOW_MILESTONES=true \
#GITHUB_TOKEN=<INSERT> \
#ZENHUB_TOKEN=<INSERT> \
poetry run python ./zcash-issue-dag.py
7 changes: 7 additions & 0 deletions template_scripts/generate_wallet_dag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

DAG_VIEW=wallet \
SHOW_MILESTONES=true \
#GITHUB_TOKEN=<INSERT> \
#ZENHUB_TOKEN=<INSERT> \
poetry run python ./zcash-issue-dag.py
7 changes: 7 additions & 0 deletions template_scripts/generate_wallet_ios_dag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

DAG_VIEW=wallet-ios \
SHOW_MILESTONES=true \
#GITHUB_TOKEN=<INSERT> \
#ZENHUB_TOKEN=<INSERT> \
poetry run python ./zcash-issue-dag.py
15 changes: 11 additions & 4 deletions zcash-issue-dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def __init__(self, repo_id, issue_number, data):
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']:
Expand Down Expand Up @@ -327,6 +328,9 @@ def should_ignore(n):
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'
Expand All @@ -345,20 +349,23 @@ def should_ignore(n):

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'
Expand Down

0 comments on commit 8e09c2f

Please sign in to comment.