BOT: Fix #839: Remove test_columns_not_present() wrapper#1083
Draft
nikosbosse wants to merge 1 commit intomainfrom
Draft
BOT: Fix #839: Remove test_columns_not_present() wrapper#1083nikosbosse wants to merge 1 commit intomainfrom
nikosbosse wants to merge 1 commit intomainfrom
Conversation
Replace the single call site in assert_forecast.forecast_binary() with an inline checkmate::test_names() call, delete the function definition, its tests, and man page. 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 #1083 +/- ##
==========================================
- Coverage 97.83% 97.83% -0.01%
==========================================
Files 35 35
Lines 1845 1844 -1
==========================================
- Hits 1805 1804 -1
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 removal of a trivial wrapper function. The inline replacement of test_columns_not_present() with test_names(colnames(forecast), disjunct.from = ...) is semantically identical — verified by reading the original function body. All 4 test specifications are covered (sample_id rejection, quantile_level rejection, valid data acceptance, function removal verification). No issues found. NAMESPACE correctly updated. 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_columns_not_present()wrapper function that simply delegated tocheckmate::test_names(..., disjunct.from = ...)assert_forecast.forecast_binary()with an inlinetest_names()callCloses #839
Root cause
test_columns_not_present()was a 1-line wrapper around an already-importedcheckmatefunction, adding unnecessary indirection.What changed
R/class-forecast-binary.R: Replacedtest_columns_not_present(forecast, ...)withtest_names(colnames(forecast), disjunct.from = ...)R/check-input-helpers.R: Deleted function definition and roxygen blocktests/testthat/test-check-input-helpers.R: Deleted thetest_columns_not_presenttest blockman/test_columns_not_present.Rd: Deleted generated man pagetests/testthat/test-class-forecast-binary.R: Added tests forquantile_levelcolumn rejection, valid data acceptance, and function removal verificationTest plan
quantile_levelcolumn correctly rejected byassert_forecast.forecast_binary()test_columns_not_presentno longer exists in the namespacesample_idcolumn rejection test continues to pass🤖 Generated with Claude Code