report-embeds: drop the registry, scan MDX for embeds#2953
Merged
Conversation
check_embeds.py already discovers every <WandbReport> by scanning the .mdx sources, so registry.yaml was a redundant second place to maintain the same list. Remove it and the registry-validation logic. - Delete scripts/report-embeds/registry.yaml. - check_embeds.py: discover embeds by scanning MDX; keep the sibling prose-link, per-page-cap, and snippet checks (static) plus URL liveness on the discovered URLs. Drop all registry loading/schema logic. No more PyYAML dependency (standard library only). - report-embeds.yml: static (prose link) on PRs; liveness weekly, filing an issue on failure. No registry-change gating, no pip install. - Update tests, README, and the AGENTS.md rule accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
📚 Mintlify Preview Links📝 Changed (3 total)⚙️ Other (3)
🤖 Generated automatically when Mintlify deployment succeeds |
Remove the unrequested TOO_MANY_EMBEDS cap (and its test). With no warning-level findings left, drop the warning/`--strict` machinery and the Finding.level field, and slim the output paths. Also drop the locale-ignored test (locale skipping stays; it's just untested here). check_embeds.py 377->245 lines, tests 201->88. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The report URL is just `src`, so the component can render the link itself instead of asking authors to add one. - WandbReport.jsx: replace the caption text link with a right-justified "View Report" button styled like the in-content button-links (.colab-link / .try-product-link), inline so the component stays self-contained. It links to the plain report URL (no ?jupyter=true). - check_embeds.py: drop the MISSING_PROSE_LINK check and the now-unused strip_embeds(). Static mode now just checks placement + a recognizable report URL; liveness unchanged. - Drop the prose-link tests; update README and the AGENTS.md rule. The `src` URL stays in the MDX source, so agents and the llms.txt export still see the report URL. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
check_embeds.py no longer takes --mode; every run does the static checks and the liveness check. The workflow collapses to a single job that blocks on PRs and files an issue on the weekly run. Also trim README.md and the AGENTS.md embed rules to match what's left after removing the registry, the prose-link requirement, and modes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One file, not two. The tests move into a `Tests` class in check_embeds.py and call the functions directly, dropping the import-by-path scaffolding. Run them with: python3 -m unittest discover -s scripts/report-embeds -p 'check_embeds.py' Reroute the two references (the workflow's unit-test step and the README) to the new command and delete scripts/report-embeds/tests/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
wandb.ai rate-limits crawlers, so liveness results are too flaky to gate merges on. Drop the pull_request trigger (and with it the unit-test step, --github annotations, paths filter, and concurrency group); the workflow is now just the weekly liveness check that files an issue on failure. Update the README and AGENTS.md notes to match (no PR gating). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove the now-dead --github flag and emit_github_annotations() (the cron workflow only uses --output-md), and the unused Iterable import. - Fold _line_of and _blank into their one caller; tighten scan(), render_markdown, and the docstring; collapse the section banners. No behavior change; retry/backoff logic and tests are untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Description
Follow-up to #2948. The
scripts/report-embeds/registry.yamlfile was a redundant maintenance surface:check_embeds.pyalready discovers every<WandbReport>by scanning the.mdxsources, so the registry was a second place to hand-maintain the same list of embeds. This removes it.Changes
scripts/report-embeds/registry.yaml.check_embeds.pynow discovers embeds by scanning the English.mdxsources. It keeps the static checks that don't need a registry — sibling prose link required for each embed, per-page cap, and "no embeds in shared snippets" — plus URL liveness on the discovered URLs. All registry loading/schema logic is gone. No more PyYAML dependency (standard library only)..github/workflows/report-embeds.ymlreduced:static(prose-link) check on PRs,livenessweekly that files an issue on failure. Dropped the registry-change gating and thepip install pyyamlstep.AGENTS.mdrule updated to match (the "register the report" step is gone; the prose-link requirement stays and is still CI-enforced).Net effect: adding an embed is now just "add
<WandbReport>+ a prose link on the page." Nothing else to keep in sync.Testing
python3 -m unittest discover -s scripts/report-embeds/tests(12 tests)python3 scripts/report-embeds/check_embeds.py --mode static— finds the 2 existing embeds with their prose links, passespython3 scripts/report-embeds/check_embeds.py --mode all— static + anonymous liveness on both URLs, passesregistry.yamlanywhere in the repoNote
The prose-link check is kept intentionally (it's registry-free — it works purely by scanning MDX), since it's the agent-legibility rule from the original design. If you'd rather this be liveness-only, that's a small follow-up.