-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go generate a mermaid flowchart for org modules #11467
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# smartcontractkit Go modules | ||
```mermaid | ||
flowchart LR | ||
subgraph chains | ||
chainlink-cosmos | ||
chainlink-evm | ||
chainlink-solana | ||
chainlink-starknet/relayer | ||
end | ||
|
||
subgraph products | ||
chainlink-automation | ||
chainlink-ccip | ||
chainlink-data-streams | ||
chainlink-feeds | ||
chainlink-functions | ||
chainlink-vrf | ||
end | ||
|
||
classDef outline stroke-dasharray:6,fill:none; | ||
class chains,products outline | ||
|
||
chainlink/v2 --> caigo | ||
click caigo href "https://github.com/smartcontractkit/caigo" | ||
chainlink/v2 --> chainlink-automation | ||
click chainlink-automation href "https://github.com/smartcontractkit/chainlink-automation" | ||
chainlink/v2 --> chainlink-common | ||
click chainlink-common href "https://github.com/smartcontractkit/chainlink-common" | ||
chainlink/v2 --> chainlink-cosmos | ||
click chainlink-cosmos href "https://github.com/smartcontractkit/chainlink-cosmos" | ||
chainlink/v2 --> chainlink-data-streams | ||
click chainlink-data-streams href "https://github.com/smartcontractkit/chainlink-data-streams" | ||
chainlink/v2 --> chainlink-feeds | ||
click chainlink-feeds href "https://github.com/smartcontractkit/chainlink-feeds" | ||
chainlink/v2 --> chainlink-solana | ||
click chainlink-solana href "https://github.com/smartcontractkit/chainlink-solana" | ||
chainlink/v2 --> chainlink-starknet/relayer | ||
click chainlink-starknet/relayer href "https://github.com/smartcontractkit/chainlink-starknet" | ||
chainlink/v2 --> chainlink-vrf | ||
click chainlink-vrf href "https://github.com/smartcontractkit/chainlink-vrf" | ||
chainlink/v2 --> libocr | ||
click libocr href "https://github.com/smartcontractkit/libocr" | ||
chainlink/v2 --> tdh2/go/ocr2/decryptionplugin | ||
click tdh2/go/ocr2/decryptionplugin href "https://github.com/smartcontractkit/tdh2" | ||
chainlink/v2 --> tdh2/go/tdh2 | ||
click tdh2/go/tdh2 href "https://github.com/smartcontractkit/tdh2" | ||
chainlink/v2 --> wsrpc | ||
click wsrpc href "https://github.com/smartcontractkit/wsrpc" | ||
chainlink-automation --> libocr | ||
chainlink-common --> libocr | ||
chainlink-cosmos --> chainlink-common | ||
chainlink-cosmos --> libocr | ||
chainlink-data-streams --> chainlink-common | ||
chainlink-data-streams --> libocr | ||
chainlink-feeds --> chainlink-common | ||
chainlink-feeds --> libocr | ||
chainlink-solana --> chainlink-common | ||
chainlink-solana --> libocr | ||
chainlink-starknet/relayer --> caigo | ||
chainlink-starknet/relayer --> chainlink-common | ||
chainlink-starknet/relayer --> libocr | ||
chainlink-vrf --> libocr | ||
tdh2/go/ocr2/decryptionplugin --> libocr | ||
tdh2/go/ocr2/decryptionplugin --> tdh2/go/tdh2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Generates go.md | ||
|
||
set -e | ||
|
||
echo "# smartcontractkit Go modules | ||
\`\`\`mermaid | ||
flowchart LR | ||
subgraph chains | ||
chainlink-cosmos | ||
chainlink-evm | ||
chainlink-solana | ||
chainlink-starknet/relayer | ||
end | ||
|
||
subgraph products | ||
chainlink-automation | ||
chainlink-ccip | ||
chainlink-data-streams | ||
chainlink-feeds | ||
chainlink-functions | ||
chainlink-vrf | ||
end | ||
|
||
classDef outline stroke-dasharray:6,fill:none; | ||
class chains,products outline | ||
" | ||
go mod graph | \ | ||
# org only | ||
grep smartcontractkit.*smartcontractkit | \ | ||
# drop prefix | ||
sed s/"github\.com\/smartcontractkit\/"/""/g | \ | ||
# insert edges | ||
sed s/" "/" --> "/ | \ | ||
# drop versions | ||
sed s/"@[^ ]*"/""/g | \ | ||
# insert links | ||
sed s/"\([^ ]*\)$"/"\1\nclick \1 href \"https:\/\/github.com\/smartcontractkit\/\1\""/ | \ | ||
# truncate links to repo | ||
sed s/"\"https:\/\/github.com\/smartcontractkit\/\([^\"\/]*\)\/.*\""/"\"https:\/\/github.com\/smartcontractkit\/\1\""/ | \ | ||
# dedupe lines | ||
awk '!x[$0]++' | \ | ||
# indent | ||
sed 's/^/ /' | ||
echo "\`\`\`" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a
sort
in here too, which produced a slightly better image, but which was not portable for some reason. My local standard ubuntu install treats/
and-
as interchangable, and so listschainlink-vrf
afterchainlin/v2
. CI standard ubuntu doesn't make this mistake. I just removed it so this wasn't blocked, but it would be nice to restore that behavior.