Repository navigation
939: Remove check_input_binary() and check_input_point() - #1242
Merged
Merged
Conversation
Forecast validation now calls check_try(assert_input_<type>()) directly, so new forecast types only need an assert_input_<type>() function. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1242 +/- ##
==========================================
- Coverage 99.18% 99.18% -0.01%
==========================================
Files 41 41
Lines 2333 2331 -2
==========================================
- Hits 2314 2312 -2
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
nikosbosse
marked this pull request as ready for review
November 8, 2026 13:34
Collaborator
Author
|
LGTM. Merging directly as it's very low-impact |
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.
CLAUDE:
Description
This PR closes #939.
It removes the last two
check_input_<forecast_type>()wrappers,check_input_binary()andcheck_input_point(), together with their roxygen blocks andman/*.Rdfiles. The wrappers for sample, quantile and interval were removed earlier, so this PR completes #939.The three call sites,
assert_forecast.forecast_binary(),assert_forecast.forecast_point()andassert_forecast.forecast_multivariate_point(), now callcheck_try(assert_input_<type>(forecast$observed, forecast$predicted))directly. That is exactly what the wrappers did, so behaviour and thecli_abort()error messages are unchanged.check_try()anddocument_check_functions()are still used elsewhere and are kept.Test tidy-ups:
test-inputs-scoring-functions.R. Its name only made sense while some wrappers still existed. It calledcrps_sample()andbias_quantile(), whichtest-metrics-sample.Randtest-metrics-quantile.Ralready cover.test-class-forecast-multivariate-point.R. It now expects"Checking \forecast`: Assertion on 'predicted' failed"instead of just"Checking `forecast`", so it pins the interpolatedcheck_try()` message from the refactored call site.Out of scope:
check_dims_ok_scalar()inR/metrics-point.Rfollows the same "check_wrapper of anassert_" pattern. #939 is about thecheck_input_<forecast_type>()helpers only, so this PR leaves it in place.Implementation: two independent drafts were compared by a judge agent, and draft A was chosen as the base.
Checklist
devtools::test()suite has 1037 passes, 0 failures and 0 errors.lintr::lint()on the changed files. The changed test files are lint-free. The only R-file lints are the known spuriousobject_usage_linter"no visible global function" warnings, which also hit unchanged code.Review
An independent adversarial agent reviewed this PR and approved it with two minor findings and two nits.
Changed in response:
check_dims_ok_scalar()(nit): added the "Out of scope" note above.Rebutted:
predictedcolumn. I confirmed that the resulting error comes from thecli_abort()inassert_forecast.forecast_multivariate_point(), which is the onlyChecking \forecast`: {input_check}` source. Instead of adding a duplicate test, I tightened that test's expected message as described above.🤖 Generated with Claude Code