Repository navigation
feat(reference): add description() to Fetcher and Renderer traits - #161
Conversation
Generated reference pages previously only restated metadata (name, shape, safety) — readers couldn't tell what each fetcher actually showed or how two siblings (`clock_almanac` vs `clock_derived`, `gauge_circle` vs `gauge_segment`) differed without opening the source. Add a required `description() -> &'static str` to `Fetcher`, `RealtimeFetcher`, and `Renderer`, populate it for every registered implementation, and surface the prose in `xtask gen-matrix` output: - per-fetcher / per-renderer page now opens with the description - matrix.md tables get a Description column Required (no default) so adding a new fetcher / renderer without a description breaks the build. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR systematically adds a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #161 +/- ##
==========================================
- Coverage 78.78% 77.76% -1.02%
==========================================
Files 122 122
Lines 22749 23045 +296
==========================================
Hits 17922 17922
- Misses 4827 5123 +296
🚀 New features to boost your workflow:
|
Summary
/reference/fetchers/*,/reference/renderers/*) previously only restated the metadata that was already visible in the matrix — name, shape, safety. A reader couldn't tell whatclock_almanacactually shows, or howgauge_circleandgauge_segmentdiffer, without opening the source.description() -> &'static strtoFetcher,RealtimeFetcher, andRenderer. Every registered impl gets a 1–2 sentence summary that explains what it does and, where siblings exist, what makes it distinct. Required (no default) so a future fetcher / renderer landing without a description breaks the build instead of silently shipping a metadata-only page.xtask gen-matrixnow opens each per-entry page with the description and adds aDescriptioncolumn to the matrix overview tables.Test plan
cargo test --workspace— 856 passcargo clippy --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleancargo xtask— regenerates every reference page and matrix.md without errors🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Added descriptive documentation to all data sources (fetchers) and display formats (renderers) — Each fetcher and renderer now includes a human-readable description explaining its purpose, behavior, output format, and when to use it alongside related alternatives.
Updated generated documentation — Documentation tables now display descriptions for quick reference and comparison between options.