BOT: Fix #769: Promote pairwise comparison test arguments to explicit parameters#1090
BOT: Fix #769: Promote pairwise comparison test arguments to explicit parameters#1090nikosbosse 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
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.
|
@seabbs do you have thoughts on this? Basically, it moves from |
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