Repository navigation
Feature/devops knowledge graph - #8
Conversation
🏷️ Automatic Content LabelsLabels were generated from Markdown frontmatter tags. Applied Labels
🤖 Automated by Label PR by Content Tags workflow |
|
Important Review skippedToo many files! This PR contains 515 files, which is 215 over the limit of 300. To get a review, reduce the PR to 300 files or fewer by splitting it into smaller PRs or changing its base branch. Usage-priced reviews support at most 300 files. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (515)
You can disable this status message by setting the 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change adds cross-topic wikilink injection, interactive knowledge-graph generation, content-validation updates, contributor guidance, and a GitHub Actions workflow that publishes the generated graph to GitHub Pages. ChangesKnowledge graph tooling and publishing
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant GitHubActions
participant BuildKnowledgeGraph
participant PagesArtifact
participant GitHubPages
GitHubActions->>BuildKnowledgeGraph: run on main push or manual dispatch
BuildKnowledgeGraph->>PagesArtifact: write docs/index.html
GitHubActions->>PagesArtifact: upload docs directory
GitHubActions->>GitHubPages: deploy Pages artifact
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches✨ Simplify code
Comment |
✅ All automated checks passedThe following checks completed successfully:
Your contribution is ready for review. 🎉 |
There was a problem hiding this comment.
Actionable comments posted: 9
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CONTRIBUTING.md`:
- Around line 87-90: Update the documented command order in CONTRIBUTING.md and
the corresponding sequence in the knowledge-graph workflow so
inject_wikilinks.py runs before build_knowledge_graph.py; preserve the existing
generation and validation steps.
In `@scripts/build_knowledge_graph.py`:
- Around line 445-515: Add an accessible, focusable search-results list
alongside the ForceGraph3D setup, exposing links for the currently filtered
nodes and allowing keyboard activation to reuse the existing onNodeClick
inspector behavior and source URL. Keep the list synchronized whenever the graph
filter changes, and update selection/focus state when the inspector opens so
keyboard users can inspect nodes and access cardLink without relying on pointer
events.
- Line 553: Update the HTML generation around HTML_TEMPLATE and
json.dumps(graph_data) to escape HTML-significant characters, especially <,
before embedding the JSON in the script context. Preserve valid JSON while
ensuring titles containing </script> cannot terminate the gData script element
or execute markup.
- Line 26: Update the LINK_RE pattern to match all relative Markdown link
targets, including sibling paths such as other-question.md, while continuing to
exclude absolute URLs and targets containing whitespace or closing parentheses.
- Around line 524-531: Update the search predicate in Graph.nodeColor to also
normalize and inspect node.difficulty and node.tags, so matches in either field
receive the highlight color alongside label, category, and section matches.
- Around line 184-185: Update the generated HTML asset tags in the
knowledge-graph build flow to use a tested, version-pinned browser-compatible
3d-force-graph bundle with an integrity attribute, and remove the separate three
script tag because the graph bundle already includes Three.
In `@scripts/inject_wikilinks.py`:
- Around line 41-55: The build_cross_link_map function must derive cross-links
from semantic question metadata (tags, category, body, and shared terms) rather
than always selecting the first question from related topics. Remove the
hard-coded fallback behavior, validate complete source-topic and target-slug
coverage for all expected topic hubs, and fail with a report listing every
unmapped topic or target slug instead of silently dropping them.
- Around line 62-63: Validate every question ID before constructing
id_to_question and cross_link_map: reject missing, non-numeric, or sentinel -1
IDs, and detect duplicate IDs with an explicit error. Perform this validation in
the surrounding injection flow before either lookup map is built, preserving
valid question processing and preventing invalid questions from overwriting one
another.
- Around line 88-90: Update the section handling in the script’s main
content-processing flow to identify a marked generated related-topics block and
replace only that block on every run instead of continuing when related sections
already exist. Add or reuse explicit generated-block markers, preserve
surrounding content, and fail with a clear error when an unmarked matching
Related Concepts or Related Questions section is encountered as manual content.
🪄 Autofix
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a0e6f19e-6d4b-4321-a0a7-f070d135c153
📒 Files selected for processing (8)
.github/pull_request_template.md.github/workflows/knowledge-graph.ymlCONTRIBUTING.mdREADME.mddocs/index.htmlscripts/build_knowledge_graph.pyscripts/inject_wikilinks.pyscripts/validate_content.py
Fixes Applied SuccessfullyFixed 511 file(s) based on 9 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 511 file(s) based on 9 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Prettier rewrites a marker comment that sits flush against the heading or the final list item, so every file the injector touched failed the lint job. Emit a blank line after BEGIN and before END.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 20 files so Prettier passes.
…s block Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 8 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 26 files so Prettier passes.
…cs block Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 8 files so Prettier passes.
…s block Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 6 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 6 files so Prettier passes.
… block Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 9 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 12 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 15 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 9 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 7 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 16 files so Prettier passes.
…lock Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 7 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 96 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 27 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 13 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 9 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 12 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 6 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 14 files so Prettier passes.
…topics block Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 9 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 6 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 8 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 6 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 8 files so Prettier passes.
…s block Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 9 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 7 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 8 files so Prettier passes.
Regenerated by scripts/inject_wikilinks.py; blank lines around the BEGIN/END markers across 10 files so Prettier passes.
The recorded sha384 did not match the asset served by unpkg, so the browser refused to execute the library and the page rendered blank.
Description
This PR introduces an interactive 3D DevOps Knowledge Graph and GitHub Pages deployment workflow for the repository:
scripts/build_knowledge_graph.pywhich compiles all 500+ DevOps interview questions and 40 topic hubs into a 3D network topology using3d-force-graphandthree.js.#0b0f19), difficulty color coding, domain section badges, live search filtering, and node inspection cards with direct source links to GitHub.scripts/inject_wikilinks.pyto map cross-cutting concept links between related DevOps topic categories..github/workflows/knowledge-graph.ymlto automatically build and deploydocs/index.htmlto GitHub Pages upon pushes tomain.README.md,CONTRIBUTING.md,pull_request_template.md, andscripts/validate_content.pyto support the graph HTML build step.Type of Change
Topic
scripts/,docs/,.github/workflows/Checklist
See CONTRIBUTING.md for the full format.
topic-slug/question-slug.md- no numeric prefix, and the slug matches the title.title, a uniqueid,categorymatching the topic title, adifficultyof Beginner/Intermediate/Advanced, and the required tags.# <title>and matches the frontmatter exactly.scripts/topic_meta.jsonwith anorder,description, andstudy_notes.python3 scripts/generate_indexes.pyandpython3 scripts/build_knowledge_graph.py(indexes and graph HTML are generated - do not hand-edit topic READMEs, graph HTML, or the root TOC).python3 scripts/validate_content.pyand it passed.