fix(docs): auto-discover API classes, fix FastPlot rename drift#169
Merged
Conversation
generate_api_docs.py no longer relies on hand-maintained class lists, which had bitrotted with phantom classes (Sensor, ThresholdRule, EventDetector, FastSenseFigure) after the Tag/FastPlot refactors. Completeness now comes from directory discovery; the per-page lists are ordering-only anchors that cannot drop or duplicate a real class. - Rename the main API page FastSense -> FastPlot to match _Sidebar.md and the project brand; the run auto-prunes the now-orphaned FastSense page - Add prune_stale_api_pages(): safely removes API-Reference pages bearing this generator's banner that it no longer produces (manual pages and generate_wiki.py-owned pages are untouched) - Warn when a scanned library has classdefs but no page mapping - CLAUDE.md: correct stale anthropic/ANTHROPIC_API_KEY references to openai/OPENROUTER_API_KEY (generate_wiki.py calls the OpenRouter API) Co-Authored-By: Claude Opus 4.8 (1M context) <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.
What & why
scripts/generate_api_docs.pybuilt the wiki API reference from hand-maintained class lists that had bitrotted — they named classes that no longer exist (Sensor,ThresholdRule,EventDetector,FastSenseFigure) after the Tag/FastPlot refactors. Separately, the project's FastSense → FastPlot rename left_Sidebar.mdpointing at a frozen orphan (API-Reference:-FastPlot.md) while the generator refreshed an unlinkedAPI-Reference:-FastSense.md.Changes
API-Reference:-FastPlot.md, matching the sidebar/brand.prune_stale_api_pages()removes anyAPI-Reference:page carrying this generator's banner that it no longer produces (auto-pruned the orphanedAPI-Reference:-FastSense.md). Manual pages likeThemes(no banner) andgenerate_wiki.py-owned pages (different banner) are untouched.anthropic/ANTHROPIC_API_KEY→openai/OPENROUTER_API_KEY(the wiki generator calls OpenRouter).Verification
Ran
python3 scripts/generate_api_docs.py(exit 0):Tag → SensorTag → MonitorTag → …family; zero phantom headings.API-Reference:-FastSense.mdauto-pruned;Themes.mduntouched.Note: merging triggers
sync-wiki.yml(mirrorswiki/to the FastSense.wiki repo) andwiki-links.yml, as intended.🤖 Generated with Claude Code