Skip to content

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

Merged
seabbs merged 4 commits into
mainfrom
fix/839-remove-test-columns-not-present
Mar 31, 2026
Merged

seabbs merged 4 commits into
mainfrom
fix/839-remove-test-columns-not-present

Conversation

@nikosbosse

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

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.94%. Comparing base (92d8d4c) to head (a6bf02f).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1083      +/-   ##
==========================================
- Coverage   97.94%   97.94%   -0.01%     
==========================================
  Files          37       37              
  Lines        1951     1950       -1     
==========================================
- Hits         1911     1910       -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.

@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, 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

@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.

LGTM

@seabbs
seabbs marked this pull request as ready for review March 30, 2026 14:20
@seabbs
seabbs enabled auto-merge March 30, 2026 14:20
@seabbs
seabbs requested a review from sbfnk March 30, 2026 14:22
@seabbs
seabbs disabled auto-merge March 31, 2026 15:49
@seabbs
seabbs merged commit 3ed7819 into main Mar 31, 2026
9 checks passed
@seabbs
seabbs deleted the fix/839-remove-test-columns-not-present branch March 31, 2026 15:50
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

2 participants