Skip to content

Fix #582: Use primarycensored dependency resolution for Stan function loading#593

Merged
seabbs merged 2 commits intoepinowcast:mainfrom
seabbs-bot:add-primarycensored-auto-deps
Apr 8, 2026
Merged

Fix #582: Use primarycensored dependency resolution for Stan function loading#593
seabbs merged 2 commits intoepinowcast:mainfrom
seabbs-bot:add-primarycensored-auto-deps

Conversation

@seabbs-bot
Copy link
Copy Markdown
Contributor

This is entirely from an agent so do not review until I have pinged for review as I will do a first pass

Summary

  • Replace pcd_load_stan_functions() (loads all functions) with explicit pcd_load_stan_functions(c("primarycensored_lpmf", "primarycensored_ode", "dist_lcdf", "primary_lpdf"), dependencies = TRUE) to use primarycensored's automatic dependency resolution
  • Includes ODE/distribution helper functions alongside primarycensored_lpmf to handle the numerical integration fallback path in Stan (needed for compilation even when only analytical solutions are used at runtime)

Test plan

  • Linting passes on changed files
  • All 72 marginal model tests pass (including Stan compilation and MCMC sampling)
  • Full test suite: 427 pass, 3 pre-existing loo integration failures unrelated to changes
  • No zero-coverage lines in changed files

This was opened by a bot. Please ping @seabbs for any questions.

…ding

Instead of loading all primarycensored Stan functions, explicitly request
primarycensored_lpmf and its ODE/distribution dependencies with
dependencies = TRUE. This uses the new automatic dependency resolution
added in primarycensored 1.4.0.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 8, 2026

Warning

Rate limit exceeded

@seabbs-bot has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 43 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 2 minutes and 43 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1a8a31e7-afe0-4310-bc94-f54cedabf3d7

📥 Commits

Reviewing files that changed from the base of the PR and between 3d6ee3e and 105e7c9.

📒 Files selected for processing (2)
  • NEWS.md
  • R/marginal_model.R
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
Copy link
Copy Markdown
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@seabbs seabbs enabled auto-merge (squash) April 8, 2026 16:56
@seabbs seabbs merged commit b8a9c4b into epinowcast:main Apr 8, 2026
9 of 10 checks passed
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