fix: compatibility with primarycensored >= 1.4.0#589
Conversation
primarycensored >= 1.4.0 added a left truncation parameter (L) to all Stan function signatures. The marginal model Stan template was missing this parameter, causing Stan compilation failures for all users. Also adds primarycensored >= 1.4.0 version bound to DESCRIPTION and extends check-cmdstan CI to cover marginal model syntax. Closes epinowcast#583
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThe PR updates epidist to support the new left-truncation parameter ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsTimed out fetching pipeline failures after 30000ms Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rpcens() no longer warns before erroring on out-of-bounds inputs, so remove the expect_warning wrapper from the out-of-bounds test.
seabbs
left a comment
There was a problem hiding this comment.
This looks good to me but is only a patch fix so we should go on to add support for left truncation for users.
Add explicit return() calls, rename q/ecdf variables to avoid shadowing base exports, fix implicit assignment in suppressMessages, and fix line length issues.
Summary
L(left truncation) parameter to theprimarycensored_lpmfStan call in the marginal model template, fixing Stan compilation failures with primarycensored >= 1.4.0primarycensored (>= 1.4.0)version bound to DESCRIPTIONcheck-cmdstanCI workflow to also check marginal model Stan syntax (previously only checked the latent model, which is why this breakage wasn't caught)Context
primarycensored 1.4.0 added left truncation support via a new
Lparameter in all Stan function signatures. This changedprimarycensored_lpmffrom 8 to 9 arguments, breaking epidist's marginal model for all users. This PR hardcodesL = 0(no left truncation) to restore compatibility. Full left truncation support is tracked in #588.Closes #583
Test plan
epidist_stancode()rstan::stanc()type checkingdpcens/rpcenscalls ingen.R) already uses named arguments so is unaffectedThis was opened by a bot. Please ping @seabbs for any questions.
Summary by CodeRabbit
Chores
Bug Fixes