Skip to content

Comments

BOT: Fix #922: Remove check_columns_present and test_columns_present#1080

Draft
nikosbosse wants to merge 1 commit intomainfrom
fix/922-remove-check-columns-present
Draft

BOT: Fix #922: Remove check_columns_present and test_columns_present#1080
nikosbosse wants to merge 1 commit intomainfrom
fix/922-remove-check-columns-present

Conversation

@nikosbosse
Copy link
Collaborator

Summary

  • Replaces all 10 call sites of check_columns_present() and 1 call site of test_columns_present() with equivalent checkmate functions (assert_subset, check_subset, test_subset)
  • Deletes both internal functions and their man pages
  • Updates test expectations to match checkmate's error message format

Fixes #922

Root cause

check_columns_present() and test_columns_present() are custom internal functions that duplicate functionality already provided by checkmate::check_subset() / checkmate::test_subset() / checkmate::assert_subset(), which is already a package dependency.

What was changed

  • R/check-input-helpers.R — Deleted check_columns_present() and test_columns_present() function definitions
  • R/class-forecast.Rassert(check_columns_present(...))assert_subset(...), test_columns_present(...)test_subset(...)
  • R/class-forecast-sample.Rassert(check_columns_present(...))assert_subset(...)
  • R/class-forecast-quantile.Rassert(check_columns_present(...))assert_subset(...)
  • R/class-forecast-nominal.Rassert(check_columns_present(...))assert_subset(...)
  • R/class-forecast-ordinal.Rassert(check_columns_present(...))assert_subset(...)
  • R/class-forecast-multivariate-sample.Rassert(check_columns_present(...))assert_subset(...)
  • R/pairwise-comparisons.Rassert(check_columns_present(...))assert_subset(...), check_columns_present(...)check_subset(...)
  • R/plot-wis.Rassert(check_columns_present(...))assert_subset(...)
  • R/get-correlations.Rcheck_columns_present(...)check_subset(...)
  • man/ — Deleted check_columns_present.Rd and test_columns_present.Rd
  • tests/ — Removed tests for deleted functions; updated error message expectations in 5 test files

Test plan

  • All 672 existing tests pass
  • R CMD check: 0 errors, 0 warnings, 2 notes (pre-existing)

🤖 Generated with Claude Code

Replace all 10 call sites of check_columns_present (and 1 of
test_columns_present) with equivalent checkmate functions
(assert_subset, check_subset, test_subset), then delete both
functions and their man pages. checkmate is already a dependency.

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.80%. Comparing base (ac0c01a) to head (89e1e6e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1080      +/-   ##
==========================================
- Coverage   97.83%   97.80%   -0.03%     
==========================================
  Files          35       35              
  Lines        1845     1826      -19     
==========================================
- Hits         1805     1786      -19     
  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, well-scoped removal of check_columns_present and test_columns_present, replaced by equivalent checkmate functions (check_subset, assert_subset, test_subset). All 11 call sites correctly handle argument order reversal and preserve identical runtime semantics. All 672 tests pass. No issues found. Verdict: approve.

@nikosbosse nikosbosse marked this pull request as draft February 13, 2026 08:27
@nikosbosse nikosbosse changed the title Fix #922: Remove check_columns_present and test_columns_present BOT: Fix #922: Remove check_columns_present and test_columns_present 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.

remove check_columns_present

1 participant