From c36dc537ef8d7a493205a924da3e617ecc9afa3e Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Sat, 7 Dec 2024 17:32:11 -0500 Subject: [PATCH] refactor: improve scopes.json structure and update scripts for better usability --- .github/scopes.json | 344 ++++++++++++++++++++++++++++------- .github/scripts/new_issue.sh | 6 +- .gitignore | 4 + 3 files changed, 283 insertions(+), 71 deletions(-) diff --git a/.github/scopes.json b/.github/scopes.json index b2454465b..884ef956d 100644 --- a/.github/scopes.json +++ b/.github/scopes.json @@ -1,82 +1,188 @@ [ { - "name": "cosmos/sdk", + "name": "app/cosmos-sdk", "path": "app", "docs": [ - "https://docs.cosmos.network/v0.50/build/building-modules/module-manager", - "https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries", - "https://docs.cosmos.network/v0.50/build/building-modules/msg-services", - "https://docs.cosmos.network/v0.50/build/building-modules/query-services", - "https://docs.cosmos.network/v0.50/build/building-modules/depinject" + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/module-manager" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/messages-and-queries" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/msg-services" + }, + { + "keywords": [ + "query" + ], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/query-services" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/depinject" + } ] }, { - "name": "cosmos/ibc", + "name": "app/ibc", "path": "app", "docs": [ - "https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/", - "https://ibc.cosmos.network/v8/apps/transfer/overview/", - "https://docs.osmosis.zone/osmosis-core/asset-info/", - "https://docs.osmosis.zone/osmosis-core/modules/tokenfactory", - "https://docs.noble.xyz/cctp/mint", - "https://docs.noble.xyz/cctp/mint_forward", - "https://docs.evmos.org/protocol/modules/erc20", - "https://docs.nomic.io/nbtc" + { + "keywords": [], + "url": "https://ibc.cosmos.network/v8/apps/interchain-accounts/overview/" + }, + { + "keywords": [], + "url": "https://ibc.cosmos.network/v8/apps/transfer/overview/" + }, + { + "keywords": [], + "url": "https://docs.osmosis.zone/osmosis-core/asset-info/" + }, + { + "keywords": [], + "url": "https://docs.osmosis.zone/osmosis-core/modules/tokenfactory" + }, + { + "keywords": [ + "usdc" + ], + "url": "https://docs.noble.xyz/cctp/mint" + }, + { + "keywords": [ + "usdc" + ], + "url": "https://docs.noble.xyz/cctp/mint_forward" + }, + { + "keywords": [], + "url": "https://docs.evmos.org/protocol/modules/erc20" + }, + { + "keywords": [], + "url": "https://docs.nomic.io/nbtc" + } ] }, { "name": "crypto/mpc", "path": "crypto/mpc", "docs": [ - "https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf" + { + "keywords": [], + "url": "https://csrc.nist.gov/CSRC/media/Events/NTCW19/papers/paper-DKLS.pdf" + } ] }, { "name": "crypto/ucan", "path": "crypto/ucan", "docs": [ - "https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md" + { + "keywords": [], + "url": "https://raw.githubusercontent.com/ucan-wg/spec/refs/heads/main/README.md" + } ] }, { "name": "crypto/zkp", "path": "crypto/accumulator", "docs": [ - "https://eprint.iacr.org/2021/1672.pdf" + { + "keywords": [], + "url": "https://eprint.iacr.org/2021/1672.pdf" + } ] }, { "name": "gateway/handlers", "path": "pkg/gateway/handlers", "docs": [ - "https://echo.labstack.com/docs/cookbook/sse", - "https://echo.labstack.com/docs/cookbook/websocket", - "https://echo.labstack.com/docs/cookbook/subdomain" + { + "keywords": [], + "url": "https://echo.labstack.com/docs/cookbook/sse" + }, + { + "keywords": [], + "url": "https://echo.labstack.com/docs/cookbook/websocket" + }, + { + "keywords": [], + "url": "https://echo.labstack.com/docs/cookbook/subdomain" + } ] }, { "name": "gateway/database", "path": "pkg/gateway/internal/database", "docs": [ - "https://docs.tigerbeetle.com/coding/data-modeling", - "https://docs.tigerbeetle.com/coding/two-phase-transfers", - "https://docs.tigerbeetle.com/coding/reliable-transaction-submission", - "https://docs.tigerbeetle.com/coding/recipes/currency-exchange", - "https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers", - "https://docs.tigerbeetle.com/reference/account", - "https://docs.tigerbeetle.com/reference/transfer", - "https://docs.substreams.dev/documentation/consume/packages", - "https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service", - "https://docs.substreams.dev/tutorials/cosmos/injective/foundational" + { + "keywords": [], + "url": "https://docs.tigerbeetle.com/coding/data-modeling" + }, + { + "keywords": [], + "url": "https://docs.tigerbeetle.com/coding/two-phase-transfers" + }, + { + "keywords": [], + "url": "https://docs.tigerbeetle.com/coding/reliable-transaction-submission" + }, + { + "keywords": [ + "currency" + ], + "url": "https://docs.tigerbeetle.com/coding/recipes/currency-exchange" + }, + { + "keywords": [ + "balance" + ], + "url": "https://docs.tigerbeetle.com/coding/recipes/balance-conditional-transfers" + }, + { + "keywords": [], + "url": "https://docs.tigerbeetle.com/reference/account" + }, + { + "keywords": [], + "url": "https://docs.tigerbeetle.com/reference/transfer" + }, + { + "keywords": [], + "url": "https://docs.substreams.dev/documentation/consume/packages" + }, + { + "keywords": [], + "url": "https://docs.substreams.dev/documentation/consume/sql/deployable-services/local-service" + }, + { + "keywords": [], + "url": "https://docs.substreams.dev/tutorials/cosmos/injective/foundational" + } ] }, { "name": "vault/handlers", "path": "pkg/vault/handlers", "docs": [ - "https://echo.labstack.com/docs/cookbook/jwt", - "https://echo.labstack.com/docs/middleware/secure", - "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" + { + "keywords": [], + "url": "https://echo.labstack.com/docs/cookbook/jwt" + }, + { + "keywords": [], + "url": "https://echo.labstack.com/docs/middleware/secure" + }, + { + "keywords": [], + "url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" + } ] }, { @@ -92,16 +198,28 @@ "name": "pkl/ipfs", "path": "pkl/ipfs.net", "docs": [ - "https://github.com/ipfs/kubo/blob/master/docs/config.md", - "https://pkl-lang.org/main/current/language-reference/index.html" + { + "keywords": [], + "url": "https://github.com/ipfs/kubo/blob/master/docs/config.md" + }, + { + "keywords": [], + "url": "https://pkl-lang.org/main/current/language-reference/index.html" + } ] }, { "name": "pkl/matrix", "path": "pkl/matrix.net", "docs": [ - "https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html", - "https://pkl-lang.org/main/current/language-reference/index.html" + { + "keywords": [], + "url": "https://element-hq.github.io/synapse/latest/usage/configuration/config_documentation.html" + }, + { + "keywords": [], + "url": "https://pkl-lang.org/main/current/language-reference/index.html" + } ] }, { @@ -118,72 +236,162 @@ "name": "pkl/hway", "path": "pkl/sonr.hway", "docs": [ - "https://pkl-lang.org/main/current/language-reference/index.html" + { + "keywords": [], + "url": "https://pkl-lang.org/main/current/language-reference/index.html" + } ] }, { "name": "pkl/motr", "path": "pkl/sonr.motr", "docs": [ - "https://pkl-lang.org/main/current/language-reference/index.html", - "https://web.dev/learn/pwa/service-workers/", - "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" + { + "keywords": [], + "url": "https://pkl-lang.org/main/current/language-reference/index.html" + }, + { + "keywords": [], + "url": "https://web.dev/learn/pwa/service-workers/" + }, + { + "keywords": [], + "url": "https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API" + } ] }, { "name": "x/did", "path": "proto/did", "docs": [ - "https://docs.cosmos.network/v0.50/build/packages/orm", - "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations", - "https://docs.cosmos.network/v0.50/build/modules/auth", - "https://docs.cosmos.network/v0.50/build/packages/collections", - "https://docs.cosmos.network/v0.50/build/modules/bank" + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/packages/orm" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/modules/auth" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/packages/collections" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/modules/bank" + } ] }, { "name": "x/dwn", "path": "proto/dwn", "docs": [ - "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations", - "https://docs.cosmos.network/v0.50/build/packages/orm", - "https://docs.cosmos.network/v0.50/build/modules/authz", - "https://docs.cosmos.network/v0.50/build/packages/collections", - "https://docs.cosmos.network/v0.50/build/modules/gov", - "https://docs.cosmos.network/v0.50/build/modules/staking" + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/packages/orm" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/modules/authz" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/packages/collections" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/modules/gov" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/modules/staking" + } ] }, { "name": "x/svc", "path": "proto/svc", "docs": [ - "https://docs.cosmos.network/v0.50/build/packages/collections", - "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations", - "https://docs.cosmos.network/v0.50/build/packages/orm", - "https://docs.cosmos.network/v0.50/build/modules/group", - "https://docs.cosmos.network/v0.50/build/modules/nft" + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/packages/collections" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/building-modules/protobuf-annotations" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/packages/orm" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/modules/group" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/modules/nft" + } ] }, { "name": "repo/ci-cd", "path": "deploy", "docs": [ - "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions", - "https://docs.cosmos.network/v0.50/build/tooling/cosmovisor", - "https://f1bonacc1.github.io/process-compose/configuration/", - "https://docs.nomic.io/network/ibc-relayer", - "https://www.jetify.com/docs/devbox", - "https://taskfile.dev/reference/cli", - "https://taskfile.dev/reference/schema", - "https://taskfile.dev/reference/templating/" + { + "keywords": [], + "url": "https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions" + }, + { + "keywords": [], + "url": "https://docs.cosmos.network/v0.50/build/tooling/cosmovisor" + }, + { + "keywords": [], + "url": "https://f1bonacc1.github.io/process-compose/configuration/" + }, + { + "keywords": [], + "url": "https://docs.nomic.io/network/ibc-relayer" + }, + { + "keywords": [], + "url": "https://www.jetify.com/docs/devbox" + }, + { + "keywords": [], + "url": "https://taskfile.dev/reference/cli" + }, + { + "keywords": [], + "url": "https://taskfile.dev/reference/schema" + }, + { + "keywords": [], + "url": "https://taskfile.dev/reference/templating/" + } ] }, { "name": "repo/docs", "path": "docs", "docs": [ - "https://squidfunk.github.io/mkdocs-material/reference/", - "https://github.com/mkdocs/catalog/blob/main/README.md" + { + "keywords": [], + "url": "https://squidfunk.github.io/mkdocs-material/reference/" + }, + { + "keywords": [], + "url": "https://github.com/mkdocs/catalog/blob/main/README.md" + } ] } ] diff --git a/.github/scripts/new_issue.sh b/.github/scripts/new_issue.sh index f3ef6bad9..f02b5de3a 100755 --- a/.github/scripts/new_issue.sh +++ b/.github/scripts/new_issue.sh @@ -6,7 +6,7 @@ ROOT_DIR=$(git rev-parse --show-toplevel) # Extract scope name and path using jq, and pass it to fzf for selection SCOPE=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r '.[] | "\(.name)"' | fzf --prompt "Select scope:") -DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[]") +DOCS=$(cat "$ROOT_DIR/.github/scopes.json" | jq -r ".[] | select(.name == \"$SCOPE\") | .docs[].url") # Write Title TITLE=$(gum input --placeholder "Issue Title...") @@ -38,9 +38,9 @@ create_body() { echo "$(($i + 1)). ${REQUIREMENTS[$i]}" done echo "### Resources:" - for doc in "${DOCS[@]}"; do + while IFS= read -r doc; do echo "- $doc" - done + done <<< "$DOCS" } ISSUE_BODY=$(create_body) diff --git a/.gitignore b/.gitignore index 9fb05d2bf..2bbd12c80 100644 --- a/.gitignore +++ b/.gitignore @@ -60,6 +60,10 @@ override.tf.json .terraformrc terraform.rc +Taskfile.yml + +!deploy/**/Taskfile.yml + # Misc .DS_Store .tmp/