Improve unit tests, add integration tests, and raise coverage to 83%#60
Merged
Conversation
Overall coverage: 62.36% → 83.33% (+21pp) New test files: - test_gg_partial.R: unit tests for gg_partial + integration tests for gg_partial_rfsrc (0% → 100% / 96.61%) - test_gg_partialpro.R: unit tests for gg_partialpro with mock VarPro data (0% → 100%) - test_varpro_feature_names.R: unit tests for one-hot suffix decoding (0% → 100%) - test_surv_partial.R: integration tests for surv_partial.rfsrc (0% → 100%) - test_ggrandomforests_news.R: smoke tests for ggrandomforests.news (0% → 100%) Expanded existing tests: - test_gg_rfsrc.R: add 14 survival tests covering per-observation curves, conf.int, by grouping, surv_type variants (chf/mortality), bs.sample, two-element level_set, and all plot.gg_rfsrc branches (gg_rfsrc.R: 30% → 75%, plot.gg_rfsrc.R: 34% → 73%) - test_gg_variable.R: add survival plots (single/multi-time, panel), regression categorical x, points/smooth=FALSE branches, missing-xvar path (plot.gg_variable.R: 51% → 76%, gg_variable.R: 78% → 82%) Also fix .Rbuildignore to suppress R CMD check NOTE about hidden directories (.claude, .git, .vscode). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60 +/- ##
===========================================
+ Coverage 62.36% 83.26% +20.90%
===========================================
Files 23 23
Lines 1812 1805 -7
===========================================
+ Hits 1130 1503 +373
+ Misses 682 302 -380 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…test coverage - Updated `plot.gg_roc` to handle multi-class ROC plots and added AUC annotations. - Refined `plot.gg_variable` to support panel plots for continuous and categorical predictors, including survival analysis. - Enhanced `plot.gg_vimp` to visualize variable importance with improved color coding for positive and negative values. - Improved `quantile_pts` function to handle missing values and ensure valid interval creation. - Enhanced `varpro_feature_names` to recover original variable names from one-hot encoded features. - Added new test files for `gg_partial`, `gg_partialpro`, and `varpro_feature_names`, expanding coverage to 83.33%. - Documented changes and improvements in MEMORY.md for better project tracking.
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.
Overall coverage: 62.36% → 83.33% (+21pp)
New test files:
Expanded existing tests:
Also fix .Rbuildignore to suppress R CMD check NOTE about hidden directories (.claude, .git, .vscode).