Skip to content

Commit

Permalink
Capigraph, UI update (#79)
Browse files Browse the repository at this point in the history
capigraph, uri->url, UI: Svelte 5 and diagrams
  • Loading branch information
kleineshertz authored Dec 19, 2024
1 parent a590c67 commit 2435876
Show file tree
Hide file tree
Showing 103 changed files with 9,553 additions and 3,112 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ jobs:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=/var/tmp/capillaries.p -service=github

- name: pkg/capigraph test coverage threshold check
env:
TESTCOVERAGE_THRESHOLD: 93.9
run: |
go test -v ./pkg/capigraph/... -coverprofile coverage.out -covermode count
totalCoverage=`go tool cover -func=coverage.out | grep total | grep -Eo '[0-9]+\.[0-9]+'`
if (( $(echo "$totalCoverage $TESTCOVERAGE_THRESHOLD" | awk '{print ($1 >= $2)}') )); then
echo -e "\033[32mOK: $totalCoverage >= $TESTCOVERAGE_THRESHOLD\033[0m"
else
echo -e "\033[31mFAILED: $totalCoverage < $TESTCOVERAGE_THRESHOLD. Cover more with unit tests or adjust threshold to a lower value.\033[0m"
exit 1
fi
- name: pkg/cql test coverage threshold check
env:
TESTCOVERAGE_THRESHOLD: 87.6
Expand Down
27 changes: 27 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,30 @@ issues:
text: use of `fmt.Print(|f|ln)` forbidden by pattern
linters:
- forbidigo
- path: pkg\/capigraph\/svg_test\.go
text: use of `fmt.Print(|f|ln)` forbidden by pattern
linters:
- forbidigo
- path: pkg\/capigraph\/layering\.go
text: function buildLayerMap has cognitive complexity
linters:
- revive
- path: pkg\/capigraph\/layer_permutator\.go
text: function \(\*LayerPermutator\)\.swapPermutationByIdx has cognitive complexity
linters:
- revive
- text: struct literal uses unkeyed fields
linters:
- govet
- path: pkg\/api\/capigraph\.go
text: function GetCapigraphDiagram has (cognitive|cyclomatic) complexity
linters:
- revive
- path: pkg\/capigraph\/svg\.go
text: maximum number of return results per function exceeded
linters:
- revive
- path: pkg\/capigraph\/viz_node_hierarchy\.go
text: maximum number of return results per function exceeded
linters:
- revive
13 changes: 11 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,22 @@
"args": []
},
{
"name": "Toolbelt",
"name": "Toolbelt validate_script",
"type": "go",
"request": "launch",
"mode": "debug",
"cwd":"${workspaceFolder}/pkg/exe/toolbelt",
"program": "${workspaceFolder}/pkg/exe/toolbelt/capitoolbelt.go",
"args": ["start_run", "-script_file=/tmp/capi_cfg/portfolio_quicktest/script.json", "-params_file=/tmp/capi_cfg/portfolio_quicktest/script_params.json", "-keyspace=portfolio_quicktest", "-start_nodes=1_read_accounts,1_read_txns,1_read_period_holdings"]
"args": ["validate_script", "-script_file=/tmp/capi_cfg/fannie_mae_quicktest/script.json", "-params_file=/tmp/capi_cfg/fannie_mae_quicktest/script_params.json", "-format=capigraph", "-detail="]
},
{
"name": "Toolbelt get_run_status_diagram",
"type": "go",
"request": "launch",
"mode": "debug",
"cwd":"${workspaceFolder}/pkg/exe/toolbelt",
"program": "${workspaceFolder}/pkg/exe/toolbelt/capitoolbelt.go",
"args": ["get_run_status_diagram", "-script_file=/tmp/capi_cfg/fannie_mae_quicktest/script.json", "-params_file=/tmp/capi_cfg/fannie_mae_quicktest/script_params.json", "-keyspace=fannie_mae_quicktest", "-run_id=1", "-format=capigraph"]
},
{
"name": "Webapi",
Expand Down
2 changes: 1 addition & 1 deletion doc/binconfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Default: 5 threads
Path to the directory containing PEM certificates for all supported CAs. Required only if any of the following is referenced by HTTPS:
- script file
- script parameter file
- [tag_criteria_uri](glossary.md#tag_criteria_uri)
- [tag_criteria_url](glossary.md#tag_criteria_url)
- input data files

To obtain the PEM cert, navigate to the file URI with a browser, open certificate information, navigate to the root certificate, save it as DER/CER (say, digicert.cer), and convert it to pem using this command:
Expand Down
331 changes: 0 additions & 331 deletions doc/dot-fanniemae.svg

This file was deleted.

317 changes: 0 additions & 317 deletions doc/dot-lookup.svg

This file was deleted.

70 changes: 0 additions & 70 deletions doc/dot-proto-file-reader-creator.svg

This file was deleted.

Loading

0 comments on commit 2435876

Please sign in to comment.