BOT: Fix #769: Promote pairwise comparison test arguments to explicit parameters#1090
Draft
nikosbosse wants to merge 1 commit intomainfrom
Draft
BOT: Fix #769: Promote pairwise comparison test arguments to explicit parameters#1090nikosbosse wants to merge 1 commit intomainfrom
nikosbosse wants to merge 1 commit intomainfrom
Conversation
…arguments 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 #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. 🚀 New features to boost your workflow:
|
nikosbosse
commented
Feb 13, 2026
Collaborator
Author
nikosbosse
left a comment
There was a problem hiding this comment.
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.
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.
Summary
test_type,one_sided, andn_permutationsfrom...passthrough to explicit named arguments inget_pairwise_comparisons(),pairwise_comparison_one_group(), andadd_relative_skill()compare_forecasts()docs to discover these optionscompare_forecasts()defaults (test_type = "non_parametric",one_sided = FALSE,n_permutations = 999)Root cause
test_type,one_sided, andn_permutationswere passed via...through 3 levels of function calls (get_pairwise_comparisons→pairwise_comparison_one_group→compare_forecasts), making them invisible to users inspecting function signatures or autocomplete.What changed
R/pairwise-comparisons.R: Addedtest_type,one_sided,n_permutationsas explicit parameters toget_pairwise_comparisons(),pairwise_comparison_one_group(), andadd_relative_skill(). Removed...from all three functions. Updated roxygen@paramdocumentation.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
Closes #769
🤖 Generated with Claude Code