Merge pull request #6 from nuttycom/poetry_support
Use `poetry` to handle dependency management.
This commit is contained in:
commit
d2d03f7bd9
33
README.md
33
README.md
|
@ -4,27 +4,50 @@ This is the source repository for the Zcash Developers Hub website: https://zcas
|
||||||
|
|
||||||
For now, this repo hosts the script used to generate ECC's development dependency graph, and a workflow that generates and hosts it.
|
For now, this repo hosts the script used to generate ECC's development dependency graph, and a workflow that generates and hosts it.
|
||||||
|
|
||||||
## Generating DAGs
|
## Setup
|
||||||
|
|
||||||
The `zcash-issue-dag.py` script has two required environment variables:
|
This project uses `poetry` for dependency management: https://python-poetry.org/
|
||||||
|
|
||||||
|
The scripts provided by this project require two environment variables:
|
||||||
|
|
||||||
- `GITHUB_TOKEN`: a GitHub API token with permission to read the necessary repositories.
|
- `GITHUB_TOKEN`: a GitHub API token with permission to read the necessary repositories.
|
||||||
- `ZENHUB_TOKEN`: a ZenHub API token.
|
- `ZENHUB_TOKEN`: a ZenHub API token.
|
||||||
|
|
||||||
It also supports several configuration options, also supplied as environment variables:
|
The DAG script depends upon graphql APIs for github which can be generated
|
||||||
|
using the following example script:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|
## Generating DAGs
|
||||||
|
|
||||||
|
The `zcash-issue-dag.py` script supports several configuration options,
|
||||||
|
also supplied as environment variables:
|
||||||
|
|
||||||
- `DAG_VIEW=[core|wallet|zf]`: The DAG to render (default: `core`).
|
- `DAG_VIEW=[core|wallet|zf]`: The DAG to render (default: `core`).
|
||||||
- `SHOW_MILESTONES=[true|false]`: Whether or not to render GitHub milestones as boxes (default: `false`).
|
- `SHOW_MILESTONES=[true|false]`: Whether or not to render GitHub milestones as boxes (default: `false`).
|
||||||
- `INCLUDE_FINISHED=[true|false]`: Whether or not to include closed issues with no open blockers (default: `false`).
|
- `INCLUDE_FINISHED=[true|false]`: Whether or not to include closed issues with no open blockers (default: `false`).
|
||||||
|
|
||||||
Here's an example script for easily running the DAG script:
|
Here's an example script for easily running the DAG generator:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
DAG_VIEW=core \
|
DAG_VIEW=core \
|
||||||
SHOW_MILESTONES=false \
|
SHOW_MILESTONES=false \
|
||||||
GITHUB_TOKEN=<INSERT> \
|
GITHUB_TOKEN=<INSERT> \
|
||||||
ZENHUB_TOKEN=<INSERT> \
|
ZENHUB_TOKEN=<INSERT> \
|
||||||
python ./zcash-issue-dag.py
|
poetry run python ./zcash-issue-dag.py
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
[tool.poetry]
|
||||||
|
name = "zcash-developer-tools"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = "Zcash Developer Tools"
|
||||||
|
authors = [
|
||||||
|
"Jack Grigg <jack@electriccoin.co>",
|
||||||
|
]
|
||||||
|
license = "MIT OR Apache-2.0"
|
||||||
|
readme = "README.md"
|
||||||
|
homepage = "https://github.com/zcash/developers/"
|
||||||
|
repository = "https://github.com/zcash/developers/"
|
||||||
|
documentation = "https://github.com/zcash/developers/"
|
||||||
|
classifiers = [
|
||||||
|
"Private :: Do Not Upload",
|
||||||
|
]
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = "^3.7"
|
||||||
|
drest = "0.9.12"
|
||||||
|
networkx = "2.6.3"
|
||||||
|
pygraphviz = "1.7"
|
||||||
|
sgqlc = "14.1"
|
Loading…
Reference in New Issue