BOT: Fix #793: separate doc pages for S3 methods with different args#1087
BOT: Fix #793: separate doc pages for S3 methods with different args#1087nikosbosse wants to merge 1 commit intomainfrom
Conversation
Three S3 methods had different parameter signatures from their generics but shared the same @Rdname, creating confusing docs with mixed args: - as_forecast_quantile.forecast_sample (probs, type vs quantile_level) - as_forecast_point.forecast_quantile (no column args vs forecast_unit etc.) - get_pit_histogram.forecast_sample (integers, n_replicates extras) Each now has its own documentation page with relevant parameters only. Added regression tests verifying method signatures remain distinct. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1087 +/- ##
=======================================
Coverage 97.83% 97.83%
=======================================
Files 35 35
Lines 1845 1845
=======================================
Hits 1805 1805
Misses 40 40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
nikosbosse
left a comment
There was a problem hiding this comment.
CLAUDE: Automated review — APPROVE. Clean, well-scoped documentation change. Correctly separates three S3 methods (as_forecast_quantile.forecast_sample, as_forecast_point.forecast_quantile, get_pit_histogram.forecast_sample) into their own .Rd pages with proper roxygen blocks, cross-links, and inherited params. The @inheritParams fix in helper-quantile-interval-range.R is necessary and correct. Regression tests cover all specified scenarios. Bonus typo fix (empircal → empirical). No issues found.
Summary
@rdnamewith their generics, resolving the confusing mixed-argument problem described in How should we document methods that have different arguments than the default method? #793as_forecast_quantile.forecast_sample,as_forecast_point.forecast_quantile,get_pit_histogram.forecast_sampleRoot cause
When S3 methods have different parameters from their generic (e.g.,
probs/typevsquantile_level), sharing@rdnamelumps all args into one flat list, making it unclear which arguments belong to which method.What the fix does
Replaces
@rdname <generic>with standalone@title/@description/@paramblocks on the three affected methods, so each gets its own.Rdpage with only its relevant parameters. Cross-links via@seealsoconnect them back to the generic.Test coverage added
as_forecast_quantile.forecast_sample()acceptsprobsandtypeargsas_forecast_point.forecast_quantile()extracts median without extra argsget_pit_histogram.forecast_sample()acceptsintegersandn_replicatesargsget_pit_histogram.forecast_quantile()does not acceptintegersargas_forecast_quantilemethodsCloses #793
🤖 Generated with Claude Code