Skip to content

BOT: Fix #793: separate doc pages for S3 methods with different args#1087

Draft
nikosbosse wants to merge 1 commit intomainfrom
fix/793-separate-method-docs
Draft

BOT: Fix #793: separate doc pages for S3 methods with different args#1087
nikosbosse wants to merge 1 commit intomainfrom
fix/793-separate-method-docs

Conversation

@nikosbosse
Copy link
Collaborator

Summary

Root cause

When S3 methods have different parameters from their generic (e.g., probs/type vs quantile_level), sharing @rdname lumps 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/@param blocks on the three affected methods, so each gets its own .Rd page with only its relevant parameters. Cross-links via @seealso connect them back to the generic.

Test coverage added

  • as_forecast_quantile.forecast_sample() accepts probs and type args
  • as_forecast_point.forecast_quantile() extracts median without extra args
  • get_pit_histogram.forecast_sample() accepts integers and n_replicates args
  • get_pit_histogram.forecast_quantile() does not accept integers arg
  • Formals differ between as_forecast_quantile methods

Closes #793

🤖 Generated with Claude Code

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
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (ac0c01a) to head (0ea0f7d).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator Author

@nikosbosse nikosbosse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nikosbosse nikosbosse marked this pull request as draft February 13, 2026 08:27
@nikosbosse nikosbosse changed the title Fix #793: separate doc pages for S3 methods with different args BOT: Fix #793: separate doc pages for S3 methods with different args Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How should we document methods that have different arguments than the default method?

1 participant

Comments