Skip to content

BOT: Fix #769: Promote pairwise comparison test arguments to explicit parameters#1090

Draft
nikosbosse wants to merge 1 commit intomainfrom
fix/769-pairwise-explicit-args
Draft

BOT: Fix #769: Promote pairwise comparison test arguments to explicit parameters#1090
nikosbosse wants to merge 1 commit intomainfrom
fix/769-pairwise-explicit-args

Conversation

@nikosbosse
Copy link
Collaborator

Summary

  • Promotes test_type, one_sided, and n_permutations from ... passthrough to explicit named arguments in get_pairwise_comparisons(), pairwise_comparison_one_group(), and add_relative_skill()
  • Improves API discoverability — users no longer need to read internal compare_forecasts() docs to discover these options
  • Backward compatible: default values match the existing compare_forecasts() defaults (test_type = "non_parametric", one_sided = FALSE, n_permutations = 999)

Root cause

test_type, one_sided, and n_permutations were passed via ... through 3 levels of function calls (get_pairwise_comparisonspairwise_comparison_one_groupcompare_forecasts), making them invisible to users inspecting function signatures or autocomplete.

What changed

  • R/pairwise-comparisons.R: Added test_type, one_sided, n_permutations as explicit parameters to get_pairwise_comparisons(), pairwise_comparison_one_group(), and add_relative_skill(). Removed ... from all three functions. Updated roxygen @param documentation.
  • man/*.Rd: Regenerated documentation for the three affected functions.
  • tests/testthat/test-pairwise_comparison.R: Added 7 new tests covering explicit argument acceptance, default values, backward compatibility, and argument threading through the call chain.

Test plan

  • All 7 new tests pass (formals checks, explicit arg passing, default values, regression)
  • Full test suite passes (713 tests, 0 failures)
  • R CMD check: 0 errors, 0 warnings, 2 notes (pre-existing)

Closes #769

🤖 Generated with Claude Code

…arguments

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.84%. Comparing base (ac0c01a) to head (cde71ce).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1090      +/-   ##
==========================================
+ Coverage   97.83%   97.84%   +0.01%     
==========================================
  Files          35       35              
  Lines        1845     1854       +9     
==========================================
+ Hits         1805     1814       +9     
  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: Clean, minimal refactor that correctly promotes test_type, one_sided, and n_permutations from ... to explicit named parameters across get_pairwise_comparisons(), pairwise_comparison_one_group(), and add_relative_skill(). Defaults match upstream compare_forecasts() exactly. NULL test_type for skipping p-values still works. All 7 new tests pass, no regressions in existing suite. Verdict: approve.

@nikosbosse nikosbosse marked this pull request as draft February 13, 2026 08:28
@nikosbosse nikosbosse changed the title Fix #769: Promote pairwise comparison test arguments to explicit parameters BOT: Fix #769: Promote pairwise comparison test arguments to explicit parameters 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.

Rethink the way arguments are passed in get_pairwise_comparisons()

1 participant

Comments