chore: remove orphaned example files and add reference check#222
Merged
Conversation
Remove 775 files under examples/ that no docs page includes. They are leftovers from an earlier docs structure and never render on the published site, but they live in a public repo where contributors and AI assistants can pick up stale or incorrect patterns. Some contain invalid code, for example a wait_for_callback call that passes a callback ID where the submitter callable belongs. Add scripts/check_example_refs.py and run it in CI so an example file that no docs page references, or an include that points at a missing file, fails the build. Closes #221
ParidelPooya
approved these changes
Jul 14, 2026
SilanHe
approved these changes
Jul 14, 2026
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
Closes #221.
Removes the 775 files under
examples/that no docs page includes, and adds a CI guard so orphans cannot accumulate again.examples/minus the set referenced by--8<--includes indocs/. Every include in the repo uses the single quoted full-file syntax, all 403 included paths exist on disk, and nothing in CI, scripts, or config consumesexamples/, so the computation has no blind spots. Files remain recoverable from git history.scripts/check_example_refs.py: fails when an example file is unreferenced (orphan) or an include points at a missing file (broken include). Follows the existingvendor_*.py --checkpattern..github/workflows/docs.ymlalongside the vendored-asset checks.Testing
python3 scripts/check_example_refs.py→OK: 403 example files, all referenced; no broken includes.examples/makes the script report it and exit 1.zensical build --clean→No issues found, zero warnings; no rendered page lost content since only unreferenced files were deleted.