Skip to content

Comments

BOT: Fix #839: Remove test_columns_not_present() wrapper#1083

Draft
nikosbosse wants to merge 1 commit intomainfrom
fix/839-remove-test-columns-not-present
Draft

BOT: Fix #839: Remove test_columns_not_present() wrapper#1083
nikosbosse wants to merge 1 commit intomainfrom
fix/839-remove-test-columns-not-present

Conversation

@nikosbosse
Copy link
Collaborator

Summary

  • Removes the trivial test_columns_not_present() wrapper function that simply delegated to checkmate::test_names(..., disjunct.from = ...)
  • Replaces the single call site in assert_forecast.forecast_binary() with an inline test_names() call
  • Deletes the function definition, its test block, and generated man page

Closes #839

Root cause

test_columns_not_present() was a 1-line wrapper around an already-imported checkmate function, adding unnecessary indirection.

What changed

  • R/class-forecast-binary.R: Replaced test_columns_not_present(forecast, ...) with test_names(colnames(forecast), disjunct.from = ...)
  • R/check-input-helpers.R: Deleted function definition and roxygen block
  • tests/testthat/test-check-input-helpers.R: Deleted the test_columns_not_present test block
  • man/test_columns_not_present.Rd: Deleted generated man page
  • tests/testthat/test-class-forecast-binary.R: Added tests for quantile_level column rejection, valid data acceptance, and function removal verification

Test plan

  • New test: quantile_level column correctly rejected by assert_forecast.forecast_binary()
  • New test: valid binary data accepted without error
  • New test: test_columns_not_present no longer exists in the namespace
  • Existing sample_id column rejection test continues to pass
  • Full test suite passes (679 tests, 0 failures)
  • R CMD check: 0 errors, 0 warnings, 2 pre-existing notes

🤖 Generated with Claude Code

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
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (ac0c01a) to head (ca004a2).

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.
📢 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, 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.

@nikosbosse nikosbosse marked this pull request as draft February 13, 2026 08:27
@nikosbosse nikosbosse changed the title Fix #839: Remove test_columns_not_present() wrapper BOT: Fix #839: Remove test_columns_not_present() wrapper 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 test_columns_not_present

1 participant