feat(ci): local ACT example, stable id links, and parser fixes#174
Merged
Conversation
Add scripts/act-examples.sh to build vizb and run deploy-examples workflows via act, skipping GitHub Pages and opening a local gallery. When ACT=true, workflows stage JSON on disk instead of using upload-artifact (incompatible with act v7), skip Pages deploy, and use a pre-built local binary via bind mount. action.yml skips remote version resolution when vizb-binary is provided.
Parallel act matrix jobs with --bind shared one data-input.txt and corrupted curl JSON before --json-path could parse it.
…on logs Propagate effective parser config back to the pipeline so inferred group columns trigger AggregateDataPoints and clear PreserveRows. ParseFunc now returns ([]DataPoint, Config). Always print the opening aggregation line; use a distinct completion message when every group key is already unique.
Start category dataZoom at 20% for grouped and mixed charts so dense datasets do not open at full range. Use axis-triggered tooltips in mixed mode (shadow for bar, snap line for line/scatter) and theme pointer colors to axisColor in light and dark mode.
CollapseDataPointsByKey cloned DataPoints without copying Metric, which stripped the 4th auto-value column from scatter output after the aggregation pipeline change. Also preserve Metric in AggregateDataPoints and add regression tests.
Wire matrix.select into the CSV examples workflow and add the life expectancy vs income scatter example. Pass select through an env var in the composite action so values like Country,"Life Expectancy",Income are not broken by bash string interpolation.
Add id input to action.yml and wire it through all deploy-examples workflows. Replace numbered matrix output keys with semantic ids, rename benchmark example files to drop NN- prefixes, and update docs to use ?id= links instead of fragile ?d= index ordering.
Restore numbered id slugs (00-, 01-, …) in deploy-examples workflows so CI controls both ?id= deep links and ?d= index alignment. Update docs and README tables to match.
Reorder deploy-examples-go matrix so http-routing is 00-http-routing and renumber remaining chronological ids.
Document running deploy-examples workflows locally with act, and add a Taskfile shortcut that delegates to scripts/act-examples.sh.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
id links, and parser fixes
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR makes the deploy-examples CI pipeline reproducible locally, migrates hosted example dashboards to stable
?id=deep links, and fixes several parser/aggregation bugs uncovered while validating CSV--selectbehavior in CI.Motivation
deploy-examples-*matrix in GitHub Actions is slow and opaque. Contributors need a fast loop to validate chart output before pushing.?d=N). Renaming or reordering examples broke bookmarks. Explicit--idslugs decouple links from matrix position while keeping chronological prefixes (00-,01-, …) aligned with?d=Nindices.--selectwas configured —selectwas not forwarded from the workflow matrix into the composite action.Changes
Local ACT workflow runner
scripts/act-examples.sh— runsdeploy-examples-{csv,go,rust,javascript,json}via act, merges artifacts intodist/examples/, and opensdist/examples/index.html..actrcwith bind-mount and user mapping for reproducible local runs.task act:examplesshortcut and CONTRIBUTING.md section.action-ci.ymlto exercise the local action path..gitignorefor act artifacts (dist/examples/,.act/).Usage:
Stable
--iddeep linksidinput toaction.yml; forwarded as--idduring JSON conversion.deploy-examples-*.ymlworkflows now setid:andoutput-json: ${{ matrix.id }}.jsoninstead of relying onoutput:filename ordering.NN-prefixes from example source files (e.g.00-hash.txt→hash.txt); chronological ordering lives in the CI matrix only.examples.mdx, README files) with?id=links.00-http-routing) — the default landing chart for Go benchmarks.Parser & aggregation fixes
CollapseDataPointsByKey/AggregateDataPointsnow copyMetricso tabular collapse does not lose axis metadata.--selectin CI: Forwardselect: ${{ matrix.select }}from workflow matrix; pass comma-quoted values safely viaINPUT_SELECTenv var inaction.yml.examples/csv/life-expentency-income.csvfor the scatter example.UI improvements
dataZoomand axis pointer behavior for large categorical datasets (line/bar/scatter).vizb-ui.gen.go).Other
fix(action): use per-job temp file for cmd input (avoids cross-job races).Id slug convention
Matrix
idprefixes match?d=Nindex (00→?d=0). Semantic?id=links are stable across reorders as long as the slug is unchanged.00-sales-auto-group…08-life-expentency-income00-http-routing,01-decode, …07-worker-pools00-tinybench,01-vitest00-criterion,01-divan00-torvalds…06-gvanrossumHow to test
Breaking changes
NN-prefixes (CI matrix owns ordering).?id=slugs from brief intermediate states (e.g.?id=hash) are obsolete; use numbered slugs (?id=03-hash) or?d=N.?d=Nlinks continue to work when matrix order is chronological.Commits (12)
feat(ci): run deploy-examples workflows locally with actfix(action): use per-job temp file for cmd inputfix(parser): aggregate auto-grouped tabular rows and refine aggregation logsfix(ui): improve large-category dataZoom and axis pointer behaviorchore: fix some typo and logsfix(parser): preserve metric when collapsing tabular data pointsfix(ci): forward matrix select and safely pass comma-quoted valuesfeat(ci): migrate example workflows to stable --id deep linksfix(ci): use chronological ids synced with matrix orderfix(ci): move HTTP routing to first Go example slotci: used individual chart at go exampledocs(ci): add act:examples task and local workflow docs