Skip to content

Fix JAGS 5 initialization in serodynamics examples - #330

Open
sschildhauer wants to merge 10 commits into
mainfrom
codex/jags-5-compatibility-pr-328
Open

sschildhauer wants to merge 10 commits into
mainfrom
codex/jags-5-compatibility-pr-328

Conversation

@sschildhauer

@sschildhauer sschildhauer commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Carries forward @martynplummer’s original commits from #328. They make the example prior for peak antibody response less diffuse so JAGS 5 can generate viable initial values and regenerate the bundled Nepal example fit.

This branch updates both getting-started examples and refreshes the snapshots tied to the regenerated fit. The version check compares the pull request’s actual commits. CI installs JAGS 5 for package checks and keeps a matching JAGS 4 toolchain for the coverage suite’s exact-draw comparisons.

Local verification

  • R CMD check on JAGS 5.0.0 finished with 0 errors, 0 warnings, and 0 notes.
  • The full test suite passed on JAGS 4.3.2 with heavy tests enabled.
  • The pkgdown articles built on JAGS 5.0.0. Roxygen 8.1.1 regenerated the documentation without changes.

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
R/load_data.r 100.00% <100.00%> (+100.00%) ⬆️

... and 30 files with indirect coverage changes

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

📖 https://ucd-serg.github.io/serodynamics/preview/pr330
Preview documentation for this PR (at commit 6f149c1)

@d-morrison d-morrison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

First review of head 6f149c1. Every check is green (R CMD check on all four platforms, test-coverage, docs-check, lint, spellcheck, version-check, changelog, pkgdown). I found nothing blocking; the points below are for you and the maintainers to weigh.

What I checked:

  • The prior change is applied consistently: R/load_data.r, data-raw/nepal_sees_jags_output.R, the four inst/examples files, and the three generated .Rd files all use 0.0001. DESCRIPTION is 0.1.0.9025 with roxygen 8.1.1, and the NEWS entry is under "New features".
  • The version-check workflow now compares head.sha and base.sha instead of branch names, which fixes the check for PRs from forks or renamed branches.
  • setup-jags is reused across five workflows instead of repeating install steps, and the old curl -k (certificate checks off) is gone.

Points to weigh:

  1. The JAGS 5.0.2 sources and installers are downloaded from SourceForge with no checksum. Pinning a sha256sum / Get-FileHash check in .github/actions/setup-jags/action.yml would protect the CI runners from a swapped download.
  2. test-coverage.yaml pins rjags 4-17 and runjags 2.2.2-5 from the CRAN Archive URL. That works today, but those links are permanent only as long as CRAN keeps them. Say in a comment when this pin can be dropped (e.g. once the exact-draw snapshots are regenerated on JAGS 5).
  3. The R-CMD-check macOS step upgrades rjags from source only when packageVersion("rjags") < "5.0", while Linux builds JAGS from source on every run. A one-line comment on why the two platforms differ would help the next maintainer.
  4. Scope: the PR mixes the prior change, CI/JAGS plumbing, a version-check fix, and a whitespace-only change to the load_data() signature in R/load_data.r. The signature reformat is unrelated; consider dropping it.
  5. serodynamics #328 carries the same prior change and is still open, and this PR says it carries those commits forward. Please close one when the other merges so they don't conflict. Also, #324 and #329 both bump the version past 0.1.0.9025, so whichever merges second needs a fresh bump.
  6. The ~13.8k-line diff is almost entirely regenerated SVG snapshots. They can't be reviewed by eye; the green check runs that compare them are the evidence here.

Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

This branch has not been deployed

No deployments
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.

3 participants