Skip to content

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

Merged
seabbs merged 3 commits into
mainfrom
fix/922-remove-check-columns-present
Apr 20, 2026
Merged

seabbs merged 3 commits into
mainfrom
fix/922-remove-check-columns-present

Conversation

@nikosbosse

Copy link
Copy Markdown
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.R — assert(check_columns_present(...)) → assert_subset(...), test_columns_present(...) → test_subset(...)
  • R/class-forecast-sample.R — assert(check_columns_present(...)) → assert_subset(...)
  • R/class-forecast-quantile.R — assert(check_columns_present(...)) → assert_subset(...)
  • R/class-forecast-nominal.R — assert(check_columns_present(...)) → assert_subset(...)
  • R/class-forecast-ordinal.R — assert(check_columns_present(...)) → assert_subset(...)
  • R/class-forecast-multivariate-sample.R — assert(check_columns_present(...)) → assert_subset(...)
  • R/pairwise-comparisons.R — assert(check_columns_present(...)) → assert_subset(...), check_columns_present(...) → check_subset(...)
  • R/plot-wis.R — assert(check_columns_present(...)) → assert_subset(...)
  • R/get-correlations.R — check_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

codecov Bot commented Feb 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.96%. Comparing base (d4bbd6e) to head (9a29004).
⚠️ Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1080      +/-   ##
==========================================
- Coverage   97.98%   97.96%   -0.02%     
==========================================
  Files          37       37              
  Lines        1984     1965      -19     
==========================================
- Hits         1944     1925      -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.

@nikosbosse nikosbosse left a comment

Copy link
Copy Markdown
Collaborator Author

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
nikosbosse and others added 2 commits April 5, 2026 13:38
…columns-present

# Conflicts:
#	R/check-input-helpers.R
#	tests/testthat/test-check-input-helpers.R
#	tests/testthat/test-class-forecast-multivariate-sample.R
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nikosbosse
nikosbosse requested a review from seabbs April 5, 2026 14:02
@nikosbosse
nikosbosse marked this pull request as ready for review April 5, 2026 14:02
@nikosbosse

Copy link
Copy Markdown
Collaborator Author

House-keeping PR, not urgent

@seabbs seabbs left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice

@seabbs
seabbs merged commit f93af87 into main Apr 20, 2026
11 checks passed
@seabbs
seabbs deleted the fix/922-remove-check-columns-present branch April 20, 2026 10:18
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

2 participants