Skip to content

Ci/knowledge graph - #1271

Open
wyzula-jan wants to merge 4 commits into
mainfrom
ci/knowledge-graph
Open

wyzula-jan wants to merge 4 commits into
mainfrom
ci/knowledge-graph

Conversation

@wyzula-jan

Copy link
Copy Markdown
Contributor

Description

[Provide a brief description of the changes introduced by this pull request.]

Related Issues

[Cite any related issues or feature requests that are addressed or resolved by this pull request. Link the associated issue, for example, with fixes #123 or closes #123.]

Type of Change

  • Change 1
  • Change 2

How to test

  • Run unit tests
  • Open [widget] in designer and play around with the properties

Potential side effects

[Describe any potential side effects or risks of merging this PR.]

Screenshots / GIFs (if applicable)

[Include any relevant screenshots or GIFs to showcase the changes made.]

Additional Comments

[Add any additional comments or information that may be helpful for reviewers.]

Definition of Done

  • Documentation is up-to-date.

@wyzula-jan wyzula-jan self-assigned this Aug 10, 2026
Copilot AI lite review requested due to automatic review settings August 10, 2026 11:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow and supporting scripts to generate a “graphify” knowledge graph for the repository and publish it as a CI artifact, while keeping generated outputs out of version control.

Changes:

  • Add knowledge-graph GitHub Actions workflow that builds and uploads the graph as an artifact (with caching).
  • Add a CI-friendly Python script (graph_rebuild.py) plus a minimal graph_spec.json to drive graph generation.
  • Ignore local/CI graph outputs via .gitignore (graphify-out/).

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
.gitignore Ignores graphify-out/ so generated knowledge-graph outputs aren’t committed.
.github/workflows/knowledge-graph.yml New workflow to build and upload the knowledge graph artifact, with a release-gate and cache.
.github/scripts/graphify/graph_spec.json Adds a default graphify scan spec for the repo.
.github/scripts/graphify/graph_rebuild.py Adds a headless Python builder to generate the graph and report in CI.
Suppressed comments (2)

.github/workflows/knowledge-graph.yml:60

  • The cache key is based on github.sha, which can differ from github.event.workflow_run.head_sha on workflow_run triggers. If you switch checkout to workflow_run.head_sha, the cache key should use the same SHA to avoid mixing caches across unrelated commits.
          path: graphify-out
          key: graphify-${{ runner.os }}-${{ github.sha }}
          restore-keys: |

.github/workflows/knowledge-graph.yml:82

  • The stamped build_meta.json commit uses github.sha, which can differ from the actual checked out commit for workflow_run events. Stamp the same SHA you build from (prefer github.event.workflow_run.head_sha when present) so the artifact metadata matches the graph contents.
          import json
          meta = json.load(open("graphify-out/build_meta.json"))
          meta["commit"] = "${{ github.sha }}"
          json.dump(meta, open("graphify-out/build_meta.json", "w"), indent=2)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +20 to +22
workflow_dispatch: {}
# TEMPORARY dry-run trigger — this commit is meant to be dropped before merge.
pull_request: {}
Comment on lines +33 to +35
- uses: actions/checkout@v4
with:
fetch-tags: true
Comment on lines +24 to +26
repo = Path(sys.argv[1]).resolve()
spec = json.loads(Path(sys.argv[2]).read_text(encoding="utf-8"))
import os
Builds the graphify knowledge graph after each semantic-release and attaches it
to that release as knowledge-graph-v<version>.tar.gz, so every developer can fetch
the map for a given version. The map carries its own identity — released package
versions, tag and commit — in build_meta.json and embedded in graph.json, which is
what lets a consumer tell a current map from a stale one. The graph is never
committed; graphify-out/ is gitignored.
Records how to fetch the map for a checkout's version and how to tell whether it
is current, so the graph is used for orientation only while it demonstrably
matches the code being read.
Lets the graph be built and fetched before any release carries it, so the
self-update path can be exercised end to end. Also stamps the PR head commit
rather than the merge commit, which exists in no local clone and would make
every staleness check report an invalid revision range.

Dry-run only — drop this commit before merging.
@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark comparison

Threshold: 20% (lower is better).
Result: 0 regression(s), 0 improvement(s) beyond threshold.

No benchmark regression exceeded the configured threshold.

No benchmark improvement exceeded the configured threshold.

All benchmark results
Benchmark Baseline Current Change Status
BEC IPython client with companion app 2.06701 s 2.01446 s -2.54% ok
BEC IPython client without companion app 2.08883 s 2.01537 s -3.52% ok
Import bec_widgets 0.01377 s 0.0127966 s -7.07% ok
tests/unit_tests/benchmarks/test_dock_area_benchmark.py::test_add_waveform_to_dock_area 0.156849 s 0.151763 s -3.24% ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants