Introductory lecture slides in methodology vignette - #527
Conversation
Bring the lecture-slide version of vignettes/methodology.qmd ("Estimating
Incidence Rates from Cross-Sectional Serosurveys") and its figures forward
from the simple-sim branch (PR #393) onto current main, slides only.
Note: the R chunks still call the pre-rename API (load_curve_params ->
load_sr_params, curve_params -> sr_params) and library(serodynamics), so the
deck does not yet render against current main; that update is follow-up work.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
|
|
Claude finished @d-morrison's task in 3m 22s —— View job PR #527 Code Review — Introductory lecture slides in methodology vignette
SummaryThe slides content is pedagogically solid and the 🚨 Blockers1.
2.
The open question in the PR description should be resolved here: add
|
| File | Likely source |
|---|---|
41579_2024_1126_Fig1_HTML.png (664 KB) |
Nature Microbiology (DOI prefix 41579) |
340149_1_En_16_Fig6_HTML.webp |
Springer book chapter |
SalmonellaTyphiFlagellarStain.jpg (916 KB) |
Unknown (CDC, Wikipedia?) |
Shigella_stool.jpg, Fievre_typhoide.png, Trombicula-larva-stylostome.jpg |
Unknown |
Journal/publisher figures are typically not freely reusable in a package website or slide deck without explicit permission. Confirm license for each image and add attribution captions before this goes live. Wikipedia/Wikimedia Commons images are fine with proper CC attribution; Nature/Springer figures almost certainly require written permission.
💬 Minor issues
4. SalmonellaTyphiFlagellarStain.jpg is 916 KB
That's large for a git-tracked binary in man/figures/. Consider compressing it (e.g., to ≤150 KB) or replacing with a lower-resolution version. Large binaries bloat the package tarball and git history permanently.
5. library(serodynamics) is called twice
Lines 311 and 431 both call library(serodynamics). The second call (line 431) is redundant.
6. Cluster-robust SE section silently removed
The original methodology.qmd had:
## Cluster-robust standard errors for clustered sampling designs
{{< include articles/_cluster-robust-se.qmd >}}This section was dropped in the rewrite. If intentional (slides don't need it), fine — but it's a content regression relative to main. Consider whether to restore it at the end or note it in the PR.
7. Double-slash typos in OSF URLs (pre-existing)
"https://osf.io/download//n6cp3/" # line 353 — double slash
url("https://osf.io/download//hqy4v/") # line 356These exist in the original file too, but worth fixing while touching this chunk. Fix this →
Looks good
VignetteIndexEntrytitle updated to match the new title — correct._quarto.ymlalready configuresrevealjsoutput globally, so noformat: revealjsis needed in the frontmatter — correct.- Lintr excludes
undesirable_function_linterandobject_name_linterfor vignettes, solibrary()calls and=assignment in code chunks are acceptable here. methodology.qmdis correctly listed in.Rbuildignore— R CMD check is unaffected.readris inSuggests, soreadr::read_csv()on line 436 is fine.- NEWS.md entry is present and appropriate.
- Version bump in DESCRIPTION is consistent with development versioning.
There was a problem hiding this comment.
Pull request overview
This PR updates the package’s methodology article to serve as an “introductory lecture slides” deck on estimating incidence from cross-sectional serosurveys, and records the documentation change in NEWS along with a dev-version bump.
Changes:
- Reworked
vignettes/methodology.qmdinto lecture-style content (slide-style structure, new figures, and updated examples). - Added/introduced usage of several new figure assets under
man/figures/for the deck. - Bumped the development version and added a NEWS entry describing the documentation update.
Reviewed changes
Copilot reviewed 3 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| vignettes/methodology.qmd | Converts/expands the methodology content into a slide-style lecture deck with new figures and example code. |
| NEWS.md | Adds a Documentation bullet describing the new lecture slides in the methodology vignette. |
| DESCRIPTION | Increments the package development version. |
| man/figures/SalmonellaTyphiFlagellarStain.jpg | Figure asset referenced by the updated methodology lecture deck. |
| man/figures/Fievre_typhoide.png | Figure asset referenced by the updated methodology lecture deck. |
| man/figures/Shigella_stool.jpg | Figure asset referenced by the updated methodology lecture deck. |
| man/figures/41579_2024_1126_Fig1_HTML.png | Figure asset referenced by the updated methodology lecture deck. |
| man/figures/Trombicula-larva-stylostome.jpg | Figure asset referenced by the updated methodology lecture deck. |
| man/figures/340149_1_En_16_Fig6_HTML.webp | Figure asset referenced by the updated methodology lecture deck. |
| --- | ||
| title: "Methodology" | ||
| title: "Estimating Incidence Rates from Cross-Sectional Serosurveys" | ||
| vignette: > | ||
| %\VignetteIndexEntry{Methodology} | ||
| %\VignetteIndexEntry{Estimating Incidence Rates from Cross-Sectional Serosurveys} | ||
| %\VignetteEngine{quarto::html} | ||
| %\VignetteEncoding{UTF-8} | ||
| bibliography: references.bib | ||
| author: Ezra Morrison, Assistant Professor of Biostatistics, Department of Public Health Sciences, UC Davis | ||
| --- |
There was a problem hiding this comment.
install and use https://github.com/d-morrison/slidebreak; don't set the format explicitly yet
| t1 = sim_case_data$timeindays | ||
| loglik0 = function(lambda) { | ||
| sum( | ||
| dexp(t1, rate = lambda, log = TRUE) | ||
| ) | ||
| } | ||
| loglik1 = Vectorize(loglik0, vectorize.args = "lambda") |
| most_obs = | ||
| case_data |> | ||
| count(id) |> | ||
| arrange(desc(n)) |> | ||
| head(10) |
| ::: {.column width="40%"} | ||
|  | ||
|  | ||
|
|
| :::: {.column width="50%"} | ||
|
|
||
|  | ||
|  | ||
| :::: |
| :::: {.column width="50%"} | ||
|
|
||
|  | ||
|  | ||
| :::: |
- Add missing @HAY2024100806 citation (Hay et al. 2024, Epidemics) to references.bib (was a render blocker). - Declare serodynamics (Suggests + Remotes UCD-SERG/serodynamics), used by the deck's R chunks. - Remove redundant second library(serodynamics) call. - Fix double-slash OSF download URLs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 2m 37s —— View job PR #527 Re-Review — Address claude review on slide deck
What was fixed in this update (commit
|
| Issue | Status |
|---|---|
Missing @HAY2024100806 citation in references.bib |
✅ Fixed — Hay et al. 2024, Epidemics entry added |
serodynamics undeclared |
✅ Fixed — added to Suggests (line 69) and Remotes (line 84) |
Redundant second library(serodynamics) call |
✅ Fixed — only one call remains (line 311) |
| Double-slash OSF download URLs | ✅ Fixed — /download// → /download/ in lines 346, 353, 356 |
The two former render blockers are resolved. The Config/Needs/website field does not need updating since serodynamics is now in Suggests + Remotes.
⚠️ Still needs attention before publishing
1. Image attribution is still missing
All images remain without source attribution or license confirmation. This is still a publishing blocker. See previous review for the breakdown by file and likely source. Current state:
| Image | Alt text | Attribution |
|---|---|---|
SalmonellaTyphiFlagellarStain.jpg |
(empty) | Missing |
Fievre_typhoide.png |
(empty) | Missing |
Shigella_stool.jpg |
(empty) | Missing |
41579_2024_1126_Fig1_HTML.png |
(empty) | Missing |
Trombicula-larva-stylostome.jpg |
"Trombicula mite" | Missing |
340149_1_En_16_Fig6_HTML.webp |
(empty) | Missing |
The 41579_* filename prefix indicates a Nature Microbiology figure and 340149_* a Springer book chapter — both almost certainly require written permission to reuse.
2. Two large binaries in man/figures/
SalmonellaTyphiFlagellarStain.jpg is 895 KB and 41579_2024_1126_Fig1_HTML.png is 664 KB. These inflate the package tarball and are permanent in git history. Consider replacing or compressing them before merge (target ≤150 KB each).
💬 Remaining Copilot items (minor)
3. Deprecated load_curve_params() in the hidden chunk
vignettes/methodology.qmd line 347 calls load_curve_params(), which has been soft-deprecated since 1.3.1 in favour of load_sr_params(). The chunk is include: false so this won't appear in rendered output, but it will emit a lifecycle warning during the docs build. Fix this →
4. = assignment in code chunks
.lintr.R enables redundant_equals_linter() without a vignette exclusion (only undesirable_function_linter and object_name_linter are excluded for vignettes/). Whether lintr processes .qmd chunks at all depends on the CI config, but to be safe:
- Line 323:
t1 = sim_case_data$timeindays - Line 324:
loglik0 = function(lambda) { - Line 329:
loglik1 = Vectorize(...) - Line 447:
most_obs =
Use <- for all four. Fix this →
5. %>% pipe in the hidden chunk
Lines 346, 353, 356 use %>% (magrittr). .lintr.R enforces pipe_consistency_linter(pipe = "|>") and does not exclude vignettes from this rule. Replace with |>. Fix this →
Summary
The two render blockers (missing citation, undeclared dependency) and the two style issues (duplicate library() call, double-slash URLs) are all resolved — good work turning those around quickly. What remains is: (1) image attribution/licensing, which is a publishing requirement rather than a build requirement and can be tracked as a follow-up issue; (2) the large binary files; and (3) three minor style issues in the hidden chunk (load_curve_params → load_sr_params, = → <-, %>% → |>). The PR is in good shape to land once attribution is handled.
… images - Add attribution captions to all 6 figures (publisher figures flagged © Springer Nature, permission required; others noted to verify). - Restore the 'Cluster-robust standard errors' section dropped in the rewrite. - Replace deprecated load_curve_params() with load_sr_params() in the hidden chunk. - Use <- and |> consistently in chunks (lintr: redundant_equals, pipe_consistency). - Compress large figures (Salmonella 895K->104K; Nature PNG 663K->265K). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 2m 25s —— View job Claude finished @d-morrison's task —— PR #527 Code Review — Round 3 (post-
|
| Issue | Status |
|---|---|
| Image captions / attribution added to all 6 figures | ✅ Done |
| Cluster-robust SE section restored | ✅ Done |
load_curve_params() → load_sr_params() |
✅ Done |
= assignment → <- (lines 323, 324, 329, 447) |
✅ Done |
%>% → |> in hidden chunk |
✅ Done |
SalmonellaTyphiFlagellarStain.jpg compressed (895 KB → 104 KB) |
✅ Done |
41579_2024_1126_Fig1_HTML.png compressed (663 KB → 265 KB) |
All previous code-correctness and style blockers are resolved.
⚠️ Still needs attention before publishing
1. Springer Nature figures require written permission (acknowledged in captions)
The captions now explicitly flag this — good transparency. However, two figures are still included that cannot legally be published on the pkgdown site without written permission from Springer Nature:
| File | Caption |
|---|---|
41579_2024_1126_Fig1_HTML.png |
"From Nature Reviews Microbiology (2024). © Springer Nature — reuse permission required." |
340149_1_En_16_Fig6_HTML.webp |
"From a Springer book chapter. © Springer Nature — reuse permission required." |
The captions are honest, which is the right call — but the slides can't go live on the website until permission is in hand (or the figures are replaced with freely-licensed alternatives). Consider tracking this as a follow-up issue so the PR can land without holding up the branch indefinitely.
2. Three Wikimedia images still say "license to verify"
| File | Caption |
|---|---|
Fievre_typhoide.png |
"Source: Wikimedia Commons (license to verify)." |
Shigella_stool.jpg |
"Source: Wikimedia Commons (license to verify)." |
Trombicula-larva-stylostome.jpg |
"Source: Wikimedia Commons (license to verify)." |
These are almost certainly CC-licensed, but proper attribution requires the specific license (CC BY-SA 4.0 etc.), image title, and author name. The Wikimedia file pages are the source of truth. This is quick to fix.
3. 41579_2024_1126_Fig1_HTML.png is still 265 KB
Down from 663 KB, which is a big improvement — but the previous review set a 150 KB target. SalmonellaTyphiFlagellarStain.jpg is now 104 KB ✅. If this figure ultimately gets replaced with a freely-licensed alternative (item 1), the size issue resolves itself. Otherwise, one more compression pass would get it under 150 KB.
Looks good — ready to merge (with publishing caveat)
serodynamicsis inSuggests+Remotes✅- Single
library(serodynamics)call (line 311) ✅ load_sr_params()used throughout ✅<-and|>consistent in all code chunks ✅@HAY2024100806citation present inreferences.bib✅- Cluster-robust SE section restored ✅
- OSF URLs clean (no double-slash) ✅
methodology.qmdin.Rbuildignore— R CMD check unaffected ✅- NEWS.md entry and version bump present ✅
The PR is mergeable into main. The two Springer figures are a publishing gate, not a merge gate — recommend merging and tracking the attribution work as a follow-up issue before enabling the docs build output for these slides.
- Add 10 terms flagged by spellcheck to inst/WORDLIST (Shigella, Springer, Trombicula, Typhi, Wikimedia, enterica, flagellar, immunocompromised, stylostome, LMICs). - Compress 41579_2024_1126_Fig1_HTML.png 265K -> 151K. Image licensing/attribution tracked in #528 (publishing gate, not merge gate). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Image licensing/attribution (the remaining review item — Springer permissions + Wikimedia license specifics) is tracked in #528. Per the code review, that's a publishing gate (docs output), not a merge gate. |
|
Claude finished @d-morrison's task in 1m 46s —— View job Claude finished @d-morrison's task —— PR #527 Code Review — Round 4 (post-
|
| Issue | Status |
|---|---|
41579_2024_1126_Fig1_HTML.png compressed to ≤150 KB |
✅ 154,220 bytes (150.6 KB) — effectively at target |
10 spellcheck terms added to inst/WORDLIST |
✅ Done (LMICs, Shigella, Springer, Trombicula, Typhi, Wikimedia, enterica, flagellar, immunocompromised, stylostome) |
💬 Minor nit
inst/WORDLIST is no longer sorted
The 10 new terms were appended at the end of the file (lines 139–148) rather than inserted in alphabetical order. spelling::spell_check_package() doesn't care about ordering, so CI will pass — but R convention is to keep WORDLIST sorted (what spelling::update_wordlist() produces). When someone adds future terms via update_wordlist() it will re-sort and produce a noisy diff. Worth a quick fix, but not a blocker. Fix this →
Ready to merge
All code-correctness and style issues from all four review rounds are resolved. The remaining publishing gate (Springer figure permissions + Wikimedia license specifics) is correctly tracked in #528 and does not block merging.
| Check | Status |
|---|---|
serodynamics declared in Suggests + Remotes |
✅ |
@HAY2024100806 citation in references.bib |
✅ |
load_sr_params() used throughout |
✅ |
<- and |> consistent in all code chunks |
✅ |
Single library(serodynamics) call |
✅ |
| OSF URLs clean (no double-slash) | ✅ |
| Cluster-robust SE section restored | ✅ |
| Figure captions / attribution added | ✅ |
SalmonellaTyphiFlagellarStain.jpg ≤150 KB (104 KB) |
✅ |
41579_2024_1126_Fig1_HTML.png near target (150.6 KB) |
✅ |
| WORDLIST terms present (spell check passes) | ✅ |
methodology.qmd in .Rbuildignore |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution tracked in #528 | ✅ |
Re-sort to the C-locale order spelling::update_wordlist() produces so the newly-added terms sit in alphabetical position and future update_wordlist runs don't make a noisy diff. Also removes a pre-existing duplicate entry. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 1m 33s —— View job PR #527 Code Review — Round 5 (post-
|
| Issue | Status |
|---|---|
inst/WORDLIST not sorted (Round 4 nit) |
✅ Fixed — re-sorted to C-locale order matching spelling::update_wordlist() output; pre-existing duplicate removed |
All clear — ready to merge
Every finding from all five review rounds is resolved:
| Check | Status |
|---|---|
serodynamics declared in Suggests + Remotes |
✅ |
@HAY2024100806 citation in references.bib |
✅ |
load_sr_params() used throughout (no deprecated load_curve_params) |
✅ |
<- and |> consistent in all code chunks |
✅ |
Single library(serodynamics) call |
✅ |
| OSF URLs clean (no double-slash) | ✅ |
| Cluster-robust SE section restored | ✅ |
| Figure captions / attribution added | ✅ |
SalmonellaTyphiFlagellarStain.jpg ≤150 KB (104 KB) |
✅ |
41579_2024_1126_Fig1_HTML.png ≤150 KB (150.6 KB) |
✅ |
| WORDLIST terms present and sorted in C-locale order | ✅ |
| No WORDLIST duplicate entries | ✅ |
methodology.qmd in .Rbuildignore — R CMD check unaffected |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution/licensing (Springer + Wikimedia specifics) tracked in #528 | ✅ |
The PR is clean. The only open item is image attribution/licensing in #528, which is correctly classified as a publishing gate (docs output), not a merge gate.
| --- | ||
| title: "Methodology" | ||
| title: "Estimating Incidence Rates from Cross-Sectional Serosurveys" | ||
| vignette: > | ||
| %\VignetteIndexEntry{Methodology} | ||
| %\VignetteIndexEntry{Estimating Incidence Rates from Cross-Sectional Serosurveys} | ||
| %\VignetteEngine{quarto::html} | ||
| %\VignetteEncoding{UTF-8} | ||
| bibliography: references.bib | ||
| author: Ezra Morrison, Assistant Professor of Biostatistics, Department of Public Health Sciences, UC Davis | ||
| --- |
There was a problem hiding this comment.
install and use https://github.com/d-morrison/slidebreak; don't set the format explicitly yet
| ::: {.column width="40%"} | ||
|  | ||
|  | ||
|
|
| * Implementing these methods in user-friendly software + GUIs (R, Shiny) | ||
|
|
||
| * Multivariate modeling of biomarkers | ||
|
|
||
| * Modeling time-varying incidence rates | ||
|
|
||
| * Accounting for re-exposure | ||
|
|
||
| * Accounting for latent immunocompromised subpopulations | ||
|
|
||
| * Calibrating to population demographics |
There was a problem hiding this comment.
update this list to include ideas going into R01.
update GUI item to extending/improving existing shiny apps (and link to http://ucdserg.ucdavis.edu/shiny_serocalculator and its repo
- Use d-morrison/slidebreak Quarto extension: replace bare --- slide
separators with {{< slidebreak >}} (no explicit format set); the extension
auto-registers the shortcode via contributes.shortcodes.
- .Rbuildignore _extensions/ (non-standard top-level dir; keeps R CMD check
clean under error-on note).
- Add fig-alt to all 6 figures for accessibility.
- Add serodynamics to Config/Needs/website so the docs build installs it.
- Point the Shiny bullet at the serocalculator Shiny app + its repo.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 2m 53s —— View job PR #527 Code Review — Round 6 (post-
|
| Item | Status |
|---|---|
Install and use d-morrison/slidebreak extension; replace bare --- with {{< slidebreak >}} |
✅ Extension vendored at _extensions/d-morrison/slidebreak/; two --- separators replaced |
Don't set format: explicitly in frontmatter |
✅ Format left implicit; _quarto.yml handles it globally |
_extensions/ added to .Rbuildignore |
✅ R CMD check unaffected |
Add fig-alt to all 6 figures |
✅ All figures now have descriptive alt text |
serodynamics in Config/Needs/website |
✅ Added — docs build will now install it |
| Update Shiny bullet with link to app + repo | ✅ Done (http://ucdserg.ucdavis.edu/shiny_serocalculator + GitHub repo) |
💬 One item from d-morrison's review still open
"Update this list to include ideas going into R01"
The d-morrison review comment on the "In-progress work" slide had two parts — the Shiny app update (done ✅) and adding R01 ideas to the list (not addressed). The current list is:
- Extending and improving existing Shiny apps
- Multivariate modeling of biomarkers
- Modeling time-varying incidence rates
- Accounting for re-exposure
- Accounting for latent immunocompromised subpopulations
- Calibrating to population demographics
This is a content decision only @d-morrison can make (only you know which R01 aims belong here). Worth confirming before merge whether the list is intentionally left as-is or if items are still to be added.
Lua extension correctness ✅
The slidebreak.lua implementation is correct:
local format = quarto.doc.is_format -- stores the function reference
if format("revealjs") or format("pptx") or format("beamer") then
return pandoc.HorizontalRule() -- slide separator in presentation formats
end
return pandoc.Null() -- no-op in html/docxquarto.doc.is_format is the right Quarto Lua API; storing it as a local and calling format("revealjs") is idiomatic. pandoc.HorizontalRule() is the correct slide-break primitive for revealjs. The _extension.yml registers it correctly under contributes.shortcodes.
All clear — all prior findings remain resolved
| Check | Status |
|---|---|
serodynamics in Suggests + Remotes + Config/Needs/website |
✅ |
@HAY2024100806 citation in references.bib |
✅ |
load_sr_params() used throughout |
✅ |
<- and |> consistent in all code chunks |
✅ |
Single library(serodynamics) call |
✅ |
| OSF URLs clean | ✅ |
| Cluster-robust SE section restored | ✅ |
All 6 figures have fig-alt |
✅ |
| Figure captions / attribution added | ✅ |
_extensions/ in .Rbuildignore |
✅ |
{{< slidebreak >}} used (no bare --- separators) |
✅ |
| Shiny app bullet updated with links | ✅ |
| Figure sizes at or near 150 KB target | ✅ |
| WORDLIST sorted in C-locale order, no duplicates | ✅ |
methodology.qmd in .Rbuildignore |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution/licensing tracked in #528 | ✅ |
The PR is ready to merge modulo the R01 ideas question above (content, not code).
New spellcheck terms from the figure alt text and the {{< slidebreak >}}
shortcode.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @d-morrison's task in 2m 8s —— View job PR #527 Code Review — Round 7 (post-
|
| Term | Position | Status |
|---|---|---|
Photomicrograph |
Line 26, between PRs and RStudio |
✅ Needed (appears in fig-alt at line 28 of methodology.qmd) |
slidebreak |
Line 136, between serosurveys and smp |
✅ Needed (the Quarto extension name introduced in 04a40d6) |
Both are inserted in correct C-locale alphabetical order. No other files changed.
💬 Round 6 open item — still pending (content decision)
"Update this list to include ideas going into R01"
The "In-progress work" slide (lines 561–575 of methodology.qmd) was not updated in this commit. This was flagged in Round 6 as a content decision only @d-morrison can make. The current list is:
- Extending and improving existing Shiny apps (with links ✅)
- Multivariate modeling of biomarkers
- Modeling time-varying incidence rates
- Accounting for re-exposure
- Accounting for latent immunocompromised subpopulations
- Calibrating to population demographics
If R01 aims should be added here, that's still outstanding. If the list is intentionally left as-is, this item can be closed.
All clear — still ready to merge
Every code-correctness and style finding from all prior review rounds remains resolved. 798b175 is a clean, minimal WORDLIST fix.
| Check | Status |
|---|---|
serodynamics in Suggests + Remotes + Config/Needs/website |
✅ |
@HAY2024100806 citation in references.bib |
✅ |
load_sr_params() used throughout |
✅ |
<- and |> consistent in all code chunks |
✅ |
Single library(serodynamics) call |
✅ |
| OSF URLs clean (no double-slash) | ✅ |
| Cluster-robust SE section restored | ✅ |
All 6 figures have fig-alt |
✅ |
| Figure captions / attribution added | ✅ |
{{< slidebreak >}} used (no bare --- separators) |
✅ |
_extensions/ in .Rbuildignore |
✅ |
SalmonellaTyphiFlagellarStain.jpg ≤150 KB (104 KB) |
✅ |
41579_2024_1126_Fig1_HTML.png ≤150 KB (150.6 KB) |
✅ |
| WORDLIST sorted in C-locale order, no duplicates | ✅ |
Photomicrograph and slidebreak added to WORDLIST |
✅ |
methodology.qmd in .Rbuildignore |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution/licensing tracked in #528 | ✅ |
|
Claude finished @d-morrison's task in 1m 23s —— View job PR #527 Code Review — Round 8 (post-merge
|
| File | Change |
|---|---|
.github/workflows/claude.yml |
+11/-4 lines — CI workflow update, unrelated to the slide deck |
No conflicts, no content changes to the PR's slide deck, DESCRIPTION, WORDLIST, or any other reviewed file.
All prior findings remain resolved ✅
Every finding from Rounds 1–7 is confirmed still intact after the merge:
| Check | Status |
|---|---|
serodynamics in Suggests + Remotes + Config/Needs/website |
✅ |
@HAY2024100806 citation in references.bib |
✅ |
load_sr_params() used throughout (no deprecated load_curve_params) |
✅ |
<- and |> consistent in all code chunks |
✅ |
Single library(serodynamics) call (line 311) |
✅ |
| OSF URLs clean (no double-slash) | ✅ |
| Cluster-robust SE section restored | ✅ |
All 6 figures have fig-alt |
✅ |
| Figure captions / attribution added | ✅ |
{{< slidebreak >}} used (no bare --- separators) |
✅ |
_extensions/ in .Rbuildignore |
✅ |
SalmonellaTyphiFlagellarStain.jpg ≤150 KB (104 KB) |
✅ |
41579_2024_1126_Fig1_HTML.png near target (150.6 KB) |
✅ |
| WORDLIST sorted in C-locale order, no duplicates | ✅ |
Photomicrograph and slidebreak in WORDLIST |
✅ |
methodology.qmd in .Rbuildignore |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution/licensing tracked in #528 | ✅ |
💬 One open item (content decision)
"Update this list to include ideas going into R01" — @d-morrison's inline review comment on the "In-progress work" slide (lines 561–575) still has two parts: the Shiny app update (done ✅) and adding R01 aims to the bullet list (still open). If R01 aims should be included, please add them; otherwise resolving the thread with "intentionally omitted" is fine.
Ready to merge
The merge was clean and trivial. No new issues were introduced. The PR is technically complete; the only gate remaining is image attribution/licensing in #528 (a publishing gate, not a merge gate, as previously noted).
|
@claude polish the intro slides; focus first on the infectious-disease-epidemiology section; add captions to all figures, and add info about symptoms and mortality rates for each disease |
|
👀 Picked up by workflow run #26491457383. R setup runs first; Claude itself responds after that. |
|
Claude Code CLI (local session) is working on this — paws off until I'm done. |
…ides # Conflicts: # .Rbuildignore # inst/WORDLIST # vignettes/articles/_macros.qmd # vignettes/articles/_sec-latent-likelihood.qmd # vignettes/methodology.qmd
|
Resolved the merge conflicts with
Spell check passes. Submodule gitlink matches main ( |
|
Claude finished @d-morrison's task in 4m 27s —— View job PR #527 Code Review — Round 13 (post-merge
|
| File | Resolution |
|---|---|
.Rbuildignore |
Kept both sides: branch's ^_extensions$ + main's ^macros$ and ^\.gitmodules$ |
inst/WORDLIST |
Kept both sides' additions; C-locale sorted (172 entries, no duplicates ✅) |
vignettes/articles/_macros.qmd |
Accepted main's deletion — macros now served by macros submodule |
vignettes/methodology.qmd |
Adopted main's notation (\pdf → \dens, \exp{...} → \expf{...}); kept branch's slide structure |
vignettes/articles/_sec-latent-likelihood.qmd |
Kept branch's . . . incremental reveal steps |
All five resolutions are correct.
Notation consistency verified ✅
No \pdf macro remains in any included file (methodology.qmd, _sec-latent-likelihood.qmd, _antibody-response-model.qmd, _cluster-robust-se.qmd). \dens is used throughout (10 occurrences in methodology.qmd alone). \expf{...} is consistent.
Macros submodule ✅
_macros.qmd deletion is correct. The macros submodule at macros/ is referenced by methodology.qmd line 11 via {{< include ../macros/macros.qmd >}}. The docs workflow uses submodules: true (.github/workflows/docs.yaml lines 91 and 99), so the submodule will be initialized during the docs build.
library(serodynamics) — two calls, both intentional ✅
Lines 389 and 723 both call library(serodynamics). They are in different contexts:
- Line 389: real evaluated chunk — needed for the simulation and log-likelihood plots
- Line 723:
eval: falsedemo chunk — shows the fullserodynamicsworkflow for the audience; it is appropriate to includelibrary(serodynamics)at the top of a self-contained code demo
This is not the same redundancy fixed in Round 2. Both calls are correct.
All prior findings remain resolved ✅
| Check | Status |
|---|---|
serodynamics in Suggests + Remotes + Config/Needs/website |
✅ |
@HAY2024100806 and @Aiemjoy_2022_Lancet in references.bib |
✅ |
load_sr_params() used throughout (no deprecated load_curve_params) |
✅ |
<- and |> consistent in all code chunks |
✅ |
| OSF URLs clean (no double-slash) | ✅ |
\dens / \expf notation unified (no \pdf remaining) |
✅ |
| Cluster-robust SE section restored | ✅ |
All 12 figures have fig-alt and captions |
✅ |
{{< slidebreak >}} used (no bare --- separators) |
✅ |
_extensions/ and macros/ both in .Rbuildignore |
✅ |
| All new figures ≤150 KB | ✅ |
| WORDLIST sorted in C-locale order, no duplicates (172 entries) | ✅ |
methodology.qmd in .Rbuildignore — R CMD check unaffected |
✅ |
macros submodule initialized via submodules: true in docs workflow |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution/licensing tracked in #528 | ✅ |
Ready to merge
The merge was clean and all conflict resolutions are correct. No new issues were introduced. Every finding from Rounds 1–12 remains resolved.
The only open items are:
- Image attribution/licensing (Springer figures + Wikimedia specifics) — tracked in Confirm image licenses/attributions for methodology lecture slides #528, publishing gate not merge gate
- "In-progress work" R01 ideas — content decision for @d-morrison
|
Done with my local session — unclaiming. |
|
@claude remove the images we don't have the rights to and insert placeholders for now |
…claude/peaceful-lovelace-4ev57s
Three images in the methodology lecture deck lacked reuse rights:
- 41579_2024_1126_Fig1_HTML.png (© Springer Nature / Nature Reviews Microbiology)
- 340149_1_En_16_Fig6_HTML.webp (© Springer Nature / book chapter)
- burden-typhoid-vaccines.png (mapchart.net, unclear license)
Changes:
- Delete all three copyrighted files from man/figures/
- Shigella slide: remove the NRM incidence choropleth; keep the
CDC/PHIL public-domain Shigella_stool.jpg (now with explicit CC/PD
attribution in the caption)
- Scrub-typhus slide: remove the Springer range map; keep
Trombicula-larva-stylostome.jpg (CC BY-SA 3.0, Alan R Walker, now
attributed in the caption)
- Burden-data-gap slide: replace burden-typhoid-vaccines.png with an
R code chunk that generates an equivalent TCV-adoption world map
using map_data("world") + publicly known country list from CDC MMWR
72(7):182–188 (public domain). Add `maps` to Config/Needs/website.
- Fix the Fievre_typhoide.png caption: it is a typhoid-distribution
world map (CC BY-SA 3.0, Wikimedia Commons), not a "historic
typhoid fever illustration".
- Fix the SalmonellaTyphiFlagellarStain.jpg caption to include the
Wikimedia Commons URL.
- Remove `Springer` from inst/WORDLIST (no longer referenced).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
map_data("world") in vignettes/methodology.qmd calls maps::map()
internally. Config/Needs/website alone is not enough — the vignette
has VignetteIndexEntry/VignetteEngine, so R CMD check will execute it
and fail without maps in Suggests.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
skip_on_os("linux") was correctly removed by the cross-platform fix
(quantize_t_next ensures consistent RNG consumption everywhere).
skip_on_cran() is restored because the test grid (5 lambdas x 2 sample
sizes x nclus=10 parallel simulations) is too slow for CRAN's per-check
time budget.
Also replaces the vague "Removed lingering terminology discrepancies"
NEWS bullet with a specific description of the strat_ests_barplot() and
strat_ests_scatterplot() axis-label corrections.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
t0 accumulates quantized (integer) steps so it is always a whole number of days. t_end is computed as age_range[2] * 365.25, which can be fractional (e.g. 3652.5). The boundary clamp t_end - t0 may therefore be fractional, but this is harmless: the integer-length time grid is unchanged. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
Previously only PRs targeting main triggered the pkgdown preview build. Remove the branches: [main] constraint so any PR gets a preview, regardless of target branch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
|
Claude finished @d-morrison's task in 2m 7s —— View job PR #527 — Remove unlicensed images and insert placeholders
What changedRemoved from
Each removed image is replaced in Left in place — Wikimedia Commons images ( |
Remove three images that require explicit reuse permission and are not yet cleared for publication: - man/figures/41579_2024_1126_Fig1_HTML.png (Nature Reviews Microbiology © Springer Nature) - man/figures/340149_1_En_16_Fig6_HTML.webp (Springer book chapter © Springer Nature) - man/figures/burden-typhoid-vaccines.png (source TBD, permission pending) Replace each with a .callout-note placeholder in methodology.qmd pointing to issue #528 where the permission requests are tracked. Wikimedia Commons images (Fievre_typhoide.png, Shigella_stool.jpg, Trombicula-larva-stylostome.jpg) are retained; they are almost certainly CC-licensed — license confirmation remains open in #528. Co-authored-by: Douglas Ezra Morrison <undefined@users.noreply.github.com>
All three conflicts were in the copyright-fix sections. Took the PR branch version (proper attributions and R-generated TCV map) over the base branch "rights pending" placeholders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
The docs build was failing with a suppressed quarto render error. Adding quiet = FALSE surfaces the full error output so we can diagnose which article is breaking and why. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
The serodynamics package (used in methodology.qmd for the fig-ex-lik-curves chunk) declares Depends/Imports on serocalculator >= 1.4.1. The previous dev version 1.4.0.9016 does not satisfy this constraint because R treats 1.4.0.9016 < 1.4.1, causing the docs build to fail at that chunk. Bumping to 1.4.1.9000 satisfies the >= 1.4.1 requirement and signals that the next planned patch release is 1.4.1. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B5FrE8RZ6EjFiz7q8zqbfg
Replace copyrighted slide figures with freely-licensed equivalents
|
Claude finished @d-morrison's task in 8m 9s —— View job PR #527 Code Review — Round 14 (post-
|
| Commit | What it did |
|---|---|
a0f3ccd |
Replaced the three copyrighted Springer figures with freely-licensed alternatives + a generated R world map |
1b17339 |
Added maps to Suggests and Config/Needs/website |
509122e |
Re-added skip_on_cran() to test-sim_pop_data_multi.R; sharpened a NEWS bullet |
4854034 |
Fixed inaccurate comment in R/simresp.tinf.R (t_end is fractional, not t0) |
16af30a |
Removed the same three copyrighted files (placeholders merged cleanly into a0f3ccd's resolution) |
e87fd66 |
Removed branches: [main] filter from docs.yaml — previews now trigger for any PR target |
8c36a9c |
Added quiet = FALSE to pkgdown::build_site() calls to surface build errors |
f508ced |
Bumped version from 1.4.0.9014 → 1.4.1.9000 to satisfy serodynamics >= 1.4.1 |
Image licensing — fully resolved ✅
All previously problematic images are now handled:
| Image | Status |
|---|---|
41579_2024_1126_Fig1_HTML.png (Springer) |
Removed ✅ |
340149_1_En_16_Fig6_HTML.webp (Springer) |
Removed ✅ |
burden-typhoid-vaccines.png |
Replaced by generated R map ✅ |
SalmonellaTyphiFlagellarStain.jpg |
CDC/PHIL public domain, Wikimedia Commons link ✅ |
Fievre_typhoide.png |
CC BY-SA 3.0, Wikimedia Commons link ✅ |
Shigella_stool.jpg |
CDC/PHIL public domain, Wikimedia Commons link ✅ |
Trombicula-larva-stylostome.jpg |
CC BY-SA 3.0, Alan R Walker, Wikimedia Commons link ✅ |
| TCV adoption map | Generated from public-domain CDC MMWR data ✅ |
Issue #528 is now substantively resolved — no pending attribution work remains.
💬 Minor items
1. quiet = FALSE in pkgdown::build_site() — intentional or temporary?
8c36a9c added quiet = FALSE to both pkgdown::build_site() calls in docs.yaml. The commit message labels this "for diagnostics." If the docs build is now stable, reverting to the default (quiet = TRUE) would reduce CI log noise. If the deck is still being iteratively developed, keeping it verbose makes sense. Either way this is not a blocker — it's a CI ergonomics preference.
2. docs.yaml branch filter removed — expected?
e87fd66 removed the branches: [main] constraint from the pull_request trigger in docs.yaml. This means docs previews now trigger for PRs targeting any branch, not just main. This is fine and intentional for this PR, but worth confirming it's the desired policy going forward.
3. Version jump to 1.4.1.9000
Bumping from 1.4.0.9014 to 1.4.1.9000 is justified (serodynamics >= 1.4.1 constraint), but it signals that the next planned patch release is 1.4.1. This is an implicit commitment: the next CRAN submission will need to be 1.4.1, not 1.4.0.1. Make sure this aligns with the release plan.
All prior findings remain resolved ✅
| Check | Status |
|---|---|
| All images freely licensed, properly attributed | ✅ (three Springer images removed; all remaining images CC/PD with attribution) |
Generated TCV map replaces burden-typhoid-vaccines.png |
✅ (public-domain source, maps in Suggests + Config/Needs/website) |
serodynamics in Suggests + Remotes + Config/Needs/website |
✅ |
maps in Suggests + Config/Needs/website |
✅ |
@HAY2024100806 and @Aiemjoy_2022_Lancet in references.bib |
✅ |
load_sr_params() used throughout (no deprecated load_curve_params) |
✅ |
<- and |> consistent in all code chunks |
✅ |
Single library(serodynamics) call in each context |
✅ |
| OSF URLs clean (no double-slash) | ✅ |
| Cluster-robust SE section restored | ✅ |
All figures have fig-alt and captions |
✅ |
{{< slidebreak >}} used (no bare --- separators) |
✅ |
_extensions/ and macros/ in .Rbuildignore |
✅ |
| All figures ≤150 KB | ✅ |
| WORDLIST sorted in C-locale order, no duplicates | ✅ |
methodology.qmd in .Rbuildignore |
✅ |
skip_on_cran() present in test-sim_pop_data_multi.R |
✅ |
Comment in simresp.tinf.R is now accurate (t_end fractional) |
✅ |
Version 1.4.1.9000 > main's 1.4.0.9016 |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution/licensing tracked in #528 (now substantively closed) | ✅ |
Ready to merge
All code-correctness and publishing blockers from all 14 review rounds are resolved. The three Springer figures are gone; all remaining images are freely licensed with proper attribution. The TCV map is generated from public-domain data. The three minor items above are CI ergonomics / release-planning questions, not merge blockers.
Removed author information from the methodology vignette.
|
Claude finished @d-morrison's task in 1m 29s —— View job PR #527 Code Review — Round 15 (post-
|
| Check | Status |
|---|---|
| All images freely licensed, properly attributed | ✅ |
serodynamics in Suggests + Remotes + Config/Needs/website |
✅ |
maps in Suggests + Config/Needs/website |
✅ |
@HAY2024100806 and @Aiemjoy_2022_Lancet in references.bib |
✅ |
load_sr_params() used throughout (no deprecated load_curve_params) |
✅ |
<- and |> consistent in all code chunks |
✅ |
Single library(serodynamics) call in each context |
✅ |
| OSF URLs clean (no double-slash) | ✅ |
| Cluster-robust SE section restored | ✅ |
All figures have fig-alt and captions |
✅ |
{{< slidebreak >}} used (no bare --- separators) |
✅ |
_extensions/ and macros/ in .Rbuildignore |
✅ |
| All figures ≤150 KB | ✅ |
| WORDLIST sorted in C-locale order, no duplicates | ✅ |
methodology.qmd in .Rbuildignore |
✅ |
skip_on_cran() present in test-sim_pop_data_multi.R |
✅ |
Comment in simresp.tinf.R accurate (t_end fractional) |
✅ |
Version 1.4.1.9000 > main's released version |
✅ |
| NEWS.md entry present | ✅ |
| Image attribution/licensing tracked in #528 | ✅ |
Ready to merge
a02ac37 is a clean, minimal housekeeping fix — removing author info from the vignette YAML is strictly correct and introduces no regressions. All 15 rounds of findings are resolved.
The only open items remain:
- Image attribution/licensing (Springer figures are removed; Wikimedia license specifics) — tracked in Confirm image licenses/attributions for methodology lecture slides #528, publishing gate not merge gate
- "In-progress work" R01 ideas — content decision for @d-morrison
|
📕 Preview documentation for this PR has been cleaned up. |
Summary
Brings the introductory lecture slides forward from the stale
simple-simbranch (PR #393, 719 commits behindmain) onto a fresh branch off currentmain— slides only, per the chosen strategy. Drops the "units support" R changes from #393, which conflicted with a year of API evolution.vignettes/methodology.qmd→ revealjs lecture deck "Estimating Incidence Rates from Cross-Sectional Serosurveys" (typhoid / dysentery / scrub typhus intro, study designs, estimation from serosurveys, likelihood derivation).man/figures/.Status / notes
load_curve_params,load_pop_data,graph_loglik(pop_data, curve_params, noise_params, …),typhoid_curves_nostrat_100all exist onmain).serodynamicssister package (sim_case_data,as_case_data,serodynamics_example, itsautoplotmethod). That package must be available in the docs render environment for the slides to build.methodology.qmdis in.Rbuildignore, so R-CMD-check is unaffected; this only matters for the docs/quarto render.Open questions
serodynamicsas a declared dependency (Suggests + Remotes) so the deck renders in CI?simulate_xsectionalData.qmdarticle improvements too, or leave them (they may depend on the dropped units feature)?🤖 Generated with Claude Code