Skip to content

Pre CRAN release 0.2.4 - #119

Open
clarkliming wants to merge 6 commits into
mainfrom
pre_cran_0.2.4
Open

clarkliming wants to merge 6 commits into
mainfrom
pre_cran_0.2.4

Conversation

@clarkliming

@clarkliming clarkliming commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

Prepares the 0.2.4 CRAN release and fixes the r-devel check failure reported on the CRAN check page.

The r-devel failure

tests/testthat/test-predict_counterfactual.R:73 errored on all five r-devel flavors (Debian clang/gcc, Fedora clang/gcc, Windows) with:

factor treatment has new levels trtpbo

while every r-patched / r-release flavor was OK, including Linux. So this is release vs. r-devel, not a platform difference.

R-devel changed model.frame.glm() to use the same logic as model.frame.lm() (PR#19036), which passes the fit's stored xlevels down to model.frame(). The test relabelled a treatment level after fitting and then handed the relabelled data back to predict_counterfactual(), so data no longer agreed with fit$xlevels. Release R let this through for glm fits only because the old model.frame.glm() re-evaluated glm(..., method = "model.frame") and dropped xlev along the way; lm fits have always errored on the same input.

The test now refits the model on the relabelled data so that the fit and the data agree, while still exercising a non-alphabetical treatment level order (trtpbo, trt1, trt2) — which is what the test is named for, and what the gl() fix from #111 guards.

Release prep

  • Bump Version to 0.2.4 and Date to 2026-08-19.
  • Rename the NEWS.md development heading to # RobinCar2 0.2.4, and add a ### Misc entry documenting the consequence for users: predict_counterfactual() now requires the treatment factor levels in data to match those of fit.
  • Drop two unused inst/WORDLIST entries.

CRAN submission status

This release cannot be submitted yet — CRAN submissions are currently on hold. The CRAN submission portal states:

CRAN submissions will be offline from Aug 5, 2026 to Aug 19, 2026 -CRAN team vacation and maintenance work)

During this time, the submission of packages is not possible.

The stated window ends today, 2026-08-19, so the intention is to submit as soon as the portal reopens. In the meantime this PR and the v0.2.4-rc1 pre-release tag stage the submission candidate, so the tarball is ready to go without further changes once submissions resume.

Test plan

  • devtools::test() on R 4.6.1 — all pass, 1 skip ({speff2trial} not installed locally).
  • R CMD check --as-cran on R 4.6.1 (aarch64 macOS), with --no-vignettes --no-build-vignettes and _R_CHECK_FORCE_SUGGESTS_=falsechecking tests ... OK and checking examples ... OK. The remaining ERROR/WARNINGs are all gaps in the local toolchain rather than package problems: no pandoc (so README.md/NEWS.md and the vignettes are unchecked), no pdflatex (so the PDF manual cannot be built), and an outdated HTML Tidy. CI covers those.
  • lintr::lint_package() — no lints in the changed files.
  • spelling::spell_check_package() — clean.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

badge

Code Coverage Summary

Filename                     Stmts    Miss  Cover    Missing
-------------------------  -------  ------  -------  ------------
R/bias.R                        34       0  100.00%
R/find_data.R                    3       0  100.00%
R/predict_couterfactual.R       77       0  100.00%
R/prediction_cf.R               22       0  100.00%
R/robin_glm.R                   49       1  97.96%   40
R/robin_lm.R                    28       0  100.00%
R/surv_effect.R                 67       0  100.00%
R/survival_cov_adj.R           146       0  100.00%
R/survival_score.R             294       0  100.00%
R/survival.R                   345       1  99.71%   603
R/treatment_effect.R           101       1  99.01%   51
R/utils.R                      204       3  98.53%   83, 115, 119
R/variance_anhecova.R           44       0  100.00%
R/variance_hc.R                 10       0  100.00%
TOTAL                         1424       6  99.58%

Diff against main

Filename      Stmts    Miss  Cover
----------  -------  ------  --------
TOTAL             0       0  +100.00%

Results for commit: 6494915

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
survival 💚 $7.81$ $-1.39$ $0$ $0$ $0$ $0$

Results for commit 9d93d63

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Unit Tests Summary

  1 files   13 suites   12s ⏱️
142 tests  96 ✅ 46 💤 0 ❌
348 runs  284 ✅ 64 💤 0 ❌

Results for commit 6494915.

♻️ This comment has been updated with latest results.

@danielinteractive

Copy link
Copy Markdown
Collaborator

@clarkliming I guess this now needs to be merged?

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.

2 participants