Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
f6d10da
Add files via upload
Kwan-Jenny May 13, 2026
c9a7b0b
Add and move Stan simulation functions and chapter 2 workflow files
Kwan-Jenny May 14, 2026
832d62b
# update minor error and run devtools::document()
Kwan-Jenny May 14, 2026
92927a0
Add tests/testthat/ for each R function
Kwan-Jenny May 14, 2026
53ff885
Add Stan simulation workflow and safe test skips
Kwan-Jenny May 14, 2026
a181804
Version update
Kwan-Jenny May 14, 2026
20d2821
Wrap heavy examples in \dontrun{} for CI compatibility
Kwan-Jenny May 15, 2026
6ac1b03
Fix lintr warnings for Stan helper functions
Kwan-Jenny May 15, 2026
eb609c0
ci: install cmdstan + enable RUN_STAN_TESTS for full verification
Kwan-Jenny May 15, 2026
2f14d33
minor error revision
Kwan-Jenny May 15, 2026
6f73966
# Fix: use requireNamespace() for serodynamics check
Kwan-Jenny May 15, 2026
835a8b6
fix: address copilot review thread issues for chapter 2 stan code
Copilot May 15, 2026
f266745
fix: limit model_2-specific priors to model_2 only
Copilot May 15, 2026
002424f
fix: guard Omega_eps extraction to model_2, move compilation out of l…
github-actions[bot] May 15, 2026
d2a595b
# fix lint
Kwan-Jenny May 15, 2026
5d34f3a
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 16, 2026
3b0b712
refactor: address Ezra's review — extract helpers, shorten files, cle…
github-actions[bot] May 16, 2026
0617ce6
Fix lint issues and remove unnecessary files
Kwan-Jenny May 16, 2026
4530514
fix: replace expect_snapshot() with expect_equal() to fix CI test fai…
github-actions[bot] May 16, 2026
0d4890b
# add macos-latest and windows-latest
Kwan-Jenny May 16, 2026
80c1be4
fix: replace .data$ with strings in tidyselect contexts
github-actions[bot] May 16, 2026
35a558f
qa: fix remaining script/function issues from QA pass
github-actions[bot] May 16, 2026
131e544
feat: extract per-biomarker Omega_P for model_1 in postprocess_stan_o…
github-actions[bot] May 16, 2026
087e2d0
# lint issue fixed
Kwan-Jenny May 16, 2026
306206f
fix: correct helper name in test and suppress draws_df/case_when warn…
github-actions[bot] May 16, 2026
48fe19b
fix: use scalar if/else for base_mae/base_rmse checks in model_compar…
github-actions[bot] May 16, 2026
9ac3174
# minor lint issue
Kwan-Jenny May 16, 2026
2134b53
refactor: final review pass — extract helpers, add DGP equations
github-actions[bot] May 16, 2026
6b65aa8
docs: fix factual errors in run_mod_stan and sim_correlated_case_data…
github-actions[bot] May 16, 2026
e718691
# minor lint update
Kwan-Jenny May 16, 2026
ead8fab
Add Phase 0/1 diagnostic scripts (n=5 + n=48) for Shiva reproducibili…
Kwan-Jenny May 18, 2026
091d802
# Remove files
Kwan-Jenny May 19, 2026
03e2621
refactor: move .write_status out of scripts into R/write_status.R
github-actions[bot] May 19, 2026
fae7377
refactor: rename phase0_no_slurm_reproducibility -> phase0_interactiv…
github-actions[bot] May 19, 2026
a1f68ac
refactor: one function per file in R/
github-actions[bot] May 19, 2026
177a6f3
fix: remove stale NAMESPACE exports and Rd/test files for deleted fun…
github-actions[bot] May 19, 2026
23f9305
Update document
Kwan-Jenny May 19, 2026
537c617
refactor: decompose for-loop bodies into helper functions
github-actions[bot] May 19, 2026
1534d6d
refactor: decompose postprocess_stan_output() into helper functions
github-actions[bot] May 19, 2026
8293c68
style: lint inst/examples/ — remove library() call, fix stale comment
github-actions[bot] May 19, 2026
c83450f
docs: remove internal references from user-facing documentation
github-actions[bot] May 19, 2026
4226a2d
fix: export write_status() so scripts/phase*.R can call it after libr…
github-actions[bot] May 19, 2026
4d9b91d
fix: resolve lint errors (brace_linter + object_length_linter)
github-actions[bot] May 19, 2026
877d6b5
fix: remove stale mock_case_data and mock_posterior_draws
github-actions[bot] May 19, 2026
0bd3bd3
fix: update .Rbuildignore for new top-level directory layout
github-actions[bot] May 19, 2026
151fc35
chore: package metadata cleanup (items 5-9)
github-actions[bot] May 19, 2026
a9dacf2
Update document and WORDLIST
Kwan-Jenny May 19, 2026
2a54e8e
Delete Rmd file
Kwan-Jenny May 20, 2026
b834cd3
fix: write_status docs, summarize helpers details, class preservation…
github-actions[bot] May 20, 2026
1ba2d1a
refactor: decompose triple-nested loop in extract_param_draws()
github-actions[bot] May 20, 2026
285db10
refactor: extract phase0/phase1 workflows into R functions; scripts -…
github-actions[bot] May 20, 2026
8961b50
chore: add .lintr config (120-char line length, all other defaults)
github-actions[bot] May 20, 2026
55f3742
# Update lint, WORDLIST, and document
Kwan-Jenny May 20, 2026
543ff01
fix: remove non-ASCII em dashes from R/ and drop unused rlang import
github-actions[bot] May 20, 2026
ecd4d3e
Update document
Kwan-Jenny May 20, 2026
d9230cc
fix: stale setwd, tryCatch Omega_B draws, sbatch comments, dot-prefix…
github-actions[bot] May 20, 2026
8017f8b
fix: guard rho_B_posterior with tryCatch, remove shigella:: qualifier…
github-actions[bot] May 21, 2026
5aacee4
docs: clarify theta_true log-scale, comment param_names, prune Suggests
github-actions[bot] May 21, 2026
f505c95
fix: restore missing #' prefixes in roxygen, reword Postprocessed, ad…
github-actions[bot] May 21, 2026
712f6a9
Fix: repair roxygen docs and suppress internal helper lint warnings
Kwan-Jenny May 21, 2026
7dd369a
# Add copilot instructions md file
Kwan-Jenny May 21, 2026
40e8a6d
Add Chapter 2 vignette and ignore Quarto notebook artifacts
Kwan-Jenny May 21, 2026
4fbd9c8
Update WORDLIST
Kwan-Jenny May 21, 2026
3822df3
Move chapter2.qmd to vignettes/articles/ as pkgdown-only article
github-actions[bot] May 21, 2026
f6310a5
Address final review items: WORDLIST cleanup, vignette code-map, and …
github-actions[bot] May 21, 2026
0c4b075
Update document and WORDLIST
Kwan-Jenny May 21, 2026
b5f5d14
Fix test: match actual timestamped filename from run_phase1_diagnostic
github-actions[bot] May 21, 2026
aceb5cd
Potential fix for pull request finding
Kwan-Jenny May 22, 2026
659ebf8
Fix factor stratification keys in run_mod_stan
Copilot May 22, 2026
f0bb698
Fix matrix dimension guards in validate_sim_inputs
Copilot May 22, 2026
3a04484
Use GITHUB_TOKEN for changed-file lint workflow
Kwan-Jenny May 22, 2026
7761d2f
# update
Kwan-Jenny May 22, 2026
7078663
Preserve case_data attrs after subset; safe pkg-version logging
github-actions[bot] May 22, 2026
64c7fbd
Merge main into chapter2 Stan simulation branch
Kwan-Jenny May 23, 2026
fafe726
update version
Kwan-Jenny May 23, 2026
3925102
# Update document and fix lint
Kwan-Jenny May 23, 2026
765286c
update
Kwan-Jenny May 23, 2026
8c95d3b
Fix R CMD check dependency declarations and build ignore entries
Copilot May 23, 2026
a7e860c
DESCRIPTION: add stan-dev/cmdstanr to Remotes
d-morrison May 23, 2026
2fc1249
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 23, 2026
44ec46e
fix: restore DESCRIPTION Title and Description lost during merge
github-actions[bot] May 23, 2026
5fae9f5
Update document
Kwan-Jenny May 23, 2026
9e44167
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 24, 2026
5ff0d81
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 24, 2026
6a88ca9
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 24, 2026
0ebdf59
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 24, 2026
aca017b
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 24, 2026
3488f43
Merge branch 'main' into chapter2-stan-simulation
d-morrison May 24, 2026
d9fcb7c
@claude: auto-commit residual uncommitted changes
claude[bot] May 24, 2026
dd485bf
@claude: auto-commit residual uncommitted changes
claude[bot] May 24, 2026
ddff6bb
@claude: auto-commit residual uncommitted changes
claude[bot] May 24, 2026
289e925
Merge branch 'main' into chapter2-stan-simulation
Kwan-Jenny May 25, 2026
ee0ab40
@claude: auto-commit residual uncommitted changes
claude[bot] May 25, 2026
b5f61ae
@claude: auto-commit residual uncommitted changes
claude[bot] May 25, 2026
e0b77d6
# update document
Kwan-Jenny May 25, 2026
adb47b0
@claude: auto-commit residual uncommitted changes
claude[bot] May 25, 2026
8479c83
@claude: auto-commit residual uncommitted changes
claude[bot] May 25, 2026
91c452c
@claude: auto-commit residual uncommitted changes
claude[bot] May 25, 2026
e81946d
add "# nolint: object_usage_linter"
Kwan-Jenny May 25, 2026
a1f519b
# lint update
Kwan-Jenny May 25, 2026
5fd2cd4
@claude: auto-commit residual uncommitted changes
claude[bot] May 25, 2026
c9bda3c
# update qmd file
Kwan-Jenny May 25, 2026
9724149
ci: add phase0 debug loop workflow
Kwan-Jenny May 26, 2026
38152dd
update version
Kwan-Jenny May 26, 2026
ef7a5f9
update debug yaml file
Kwan-Jenny May 26, 2026
a89b0db
ci(phase0): drop unused GITHUB_PAT; guard empty outputs/ci
Kwan-Jenny May 26, 2026
2153fdd
ci(phase0): unset auto-injected GITHUB_PAT before install_deps
Kwan-Jenny May 26, 2026
1a796e3
update phase0-debug yaml file
Kwan-Jenny May 26, 2026
cf86b68
ci(phase0): use remotes::install_local for local package install
Kwan-Jenny May 26, 2026
c73ebe6
ci(phase0): use R CMD INSTALL for local package (no R-pkg deps)
Kwan-Jenny May 26, 2026
75c6946
ci(phase0): n=5 run 26435798026 [skip ci]
github-actions[bot] May 26, 2026
b693e13
@claude: auto-commit residual uncommitted changes
claude[bot] May 26, 2026
cde866d
ci(phase0): baseline bimodality diagnostic for n=5 run 26435798026
Kwan-Jenny May 26, 2026
8db8ff7
feat(phase2.5): parametrize diagnostic_bimodality.R via positional ou…
github-actions[bot] May 26, 2026
9121b84
ci(phase0): auto-run bimodality diagnostic after fit
Kwan-Jenny May 26, 2026
7ce44eb
@claude: auto-commit residual uncommitted changes
claude[bot] May 26, 2026
1a625c4
ci(phase0): n=5 run 26470701379 [skip ci]
github-actions[bot] May 26, 2026
b7625bc
@claude: auto-commit residual uncommitted changes
claude[bot] May 26, 2026
05591c3
ci(phase0): n=5 run 26549772922 [skip ci]
github-actions[bot] May 28, 2026
2fa82ab
stan: raise max_treedepth 15 to 20 to resolve treedepth saturation
claude May 28, 2026
36bfe5d
ci(phase0): n=5 run 26551575231 [skip ci]
github-actions[bot] May 28, 2026
e83d29d
@claude: auto-commit residual uncommitted changes
claude[bot] May 28, 2026
e7dac4d
ci(phase0): n=5 run 26589037994 [skip ci]
github-actions[bot] May 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
^data-raw$
^README\.Rmd$
^\.lintr\.R$
^\.lintr$
^scripts$
^slurm$
^_quarto\.yml$
^.*\.qmd$
^.*\.png$
Expand Down
12 changes: 12 additions & 0 deletions .do_commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
git -c user.name="Claude" -c user.email="claude[bot]@users.noreply.github.com" \
commit --author="claude[bot] <claude[bot]@users.noreply.github.com>" \
-m "fix(sampler): increase max_treedepth default from 12 to 15

50% treedepth saturation on n=5 phase0 run (500/1000 transitions hit
the ceiling) is the dominant driver of ESS_bulk=16 and R-hat=1.766.
The LKJ Cholesky geometry requires longer HMC trajectories than
max_treedepth=12 allows; raising to 15 gives 8x more trajectory
length budget before truncation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>"
3 changes: 3 additions & 0 deletions .gitconfig_tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[user]
name = Claude
email = claude[bot]@users.noreply.github.com
123 changes: 78 additions & 45 deletions .github/workflows/phase0-debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ name: Phase 0 Debug Loop
# to the branch under outputs/ci/ so Claude can read them in the
# next turn.
#
# Architecture note:
# This workflow uses the standard r-lib/actions/setup-r-dependencies@v2
# pattern, matching every other R workflow in this repo (R-CMD-check,
# test-coverage, pkgdown, etc.). That action handles DESCRIPTION
# parsing, Remotes: field resolution, system dependencies, caching,
# and (critically) GitHub authentication correctly. Earlier versions
# of this workflow tried to call remotes::install_deps() directly
# and hit 401 errors that turned out to be due to token plumbing
# that setup-r-dependencies handles transparently.
#
# Trigger:
# Manual only (workflow_dispatch). Use either the "Run workflow"
# button in the Actions tab, or:
Expand Down Expand Up @@ -49,67 +59,71 @@ permissions:
contents: write

concurrency:
# one phase0 run at a time per branch — prevents conflicting commits
group: phase0-debug-${{ github.ref }}
cancel-in-progress: false

jobs:
phase0:
runs-on: ubuntu-latest
timeout-minutes: 350 # 350 min is safely under the 360 free-tier cap
timeout-minutes: 350
env:
N_SUBJECTS: ${{ inputs.n }}
ITER_WARMUP: ${{ inputs.iter_warmup }}
ITER_SAMPLING: ${{ inputs.iter_sampling }}
CHAINS: ${{ inputs.chains }}
CMDSTAN_VERSION: "2.38.0"
# Matches every other R workflow in this repo. Required for setup-r-dependencies
# to authenticate package downloads from GitHub (including UCD-SERG/serodynamics
# via the Remotes: field in DESCRIPTION).
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
N_SUBJECTS: ${{ inputs.n }}
ITER_WARMUP: ${{ inputs.iter_warmup }}
ITER_SAMPLING: ${{ inputs.iter_sampling }}
CHAINS: ${{ inputs.chains }}
CMDSTAN_VERSION: "2.38.0"

steps:
- name: Checkout PR branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
# persist-credentials default true; needed for the later push.

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: "release"
use-public-rspm: true

- name: Install package dependencies
# This step handles:
# - DESCRIPTION Imports / Depends / LinkingTo / Suggests
# - Remotes: field (stan-dev/cmdstanr, UCD-SERG/serodynamics)
# - System libraries (apt-get install)
# - Caching (transparent)
# The same action and same auth setup are used by R-CMD-check.yaml.
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::devtools
any::posterior
stan-dev/cmdstanr
needs: check

- name: Cache cmdstan
id: cache-cmdstan
uses: actions/cache@v4
with:
path: ~/.cmdstan
key: cmdstan-${{ runner.os }}-${{ env.CMDSTAN_VERSION }}

- name: System dependencies for R packages
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev \
libfontconfig1-dev libharfbuzz-dev libfribidi-dev \
libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev

- name: Install R packages (CRAN + r-universe)
run: |
install.packages(c("devtools", "remotes", "posterior", "rlang"))
install.packages("cmdstanr",
repos = c("https://stan-dev.r-universe.dev",
"https://cloud.r-project.org"))
shell: Rscript {0}
restore-keys: |
cmdstan-${{ runner.os }}-

- name: Install cmdstan (only if cache miss)
if: steps.cache-cmdstan.outputs.cache-hit != 'true'
run: |
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
cmdstanr::install_cmdstan(version = Sys.getenv("CMDSTAN_VERSION"),
cores = 2)
cmdstanr::install_cmdstan(
version = Sys.getenv("CMDSTAN_VERSION"),
cores = 2
)
shell: Rscript {0}

- name: Register cmdstan path
run: |
# Whether cached or freshly installed, point cmdstanr at it.
paths <- list.files("~/.cmdstan", pattern = "^cmdstan-",
full.names = TRUE)
stopifnot(length(paths) >= 1)
Expand All @@ -118,14 +132,14 @@ jobs:
cat("cmdstan version:", cmdstanr::cmdstan_version(), "\n")
shell: Rscript {0}

- name: Install shigella package + dependencies
run: |
# remotes handles the Remotes: field in DESCRIPTION
# (UCD-SERG/serodynamics, stan-dev/cmdstanr).
remotes::install_deps(".", dependencies = TRUE, upgrade = "never")
devtools::install(".", dependencies = FALSE, upgrade = "never",
quick = TRUE, build = FALSE)
shell: Rscript {0}
- name: Install local shigella package
# Use R CMD INSTALL (base R, shell-level) instead of devtools::install
# or remotes::install_local. setup-r-dependencies@v2 doesn't guarantee
# remotes/devtools remain in the user library after it finishes, and
# devtools::install's `upgrade` arg expectations vary by version.
# R CMD INSTALL has no such dependencies — it's the lowest-level
# installer and always works.
run: R CMD INSTALL --no-multiarch --with-keep.source .

- name: Run Phase 0 diagnostic
id: run
Expand All @@ -137,7 +151,6 @@ jobs:
mkdir -p "${OUT_DIR}"

Rscript -e '
# Explicit %||% for R < 4.4 compatibility on GitHub runners
`%||%` <- function(a, b) if (is.null(a)) b else a

out_dir <- Sys.getenv("OUT_DIR")
Expand Down Expand Up @@ -165,14 +178,13 @@ jobs:
NULL
})

# Write a structured SUMMARY.txt that Claude can grep.
summary_path <- file.path(out_dir, "SUMMARY.txt")
lines <- c(
sprintf("RUN_ID: %s", Sys.getenv("GITHUB_RUN_ID")),
sprintf("N: %d", n),
sprintf("RUN_ID: %s", Sys.getenv("GITHUB_RUN_ID")),
sprintf("N: %d", n),
sprintf("ITER_WARMUP: %d", iter_warmup),
sprintf("ITER_SAMPLING: %d", iter_samp),
sprintf("CHAINS: %d", chains)
sprintf("CHAINS: %d", chains)
)

if (is.null(res)) {
Expand All @@ -195,7 +207,6 @@ jobs:
sprintf("TREEDEPTH: %d / %d", sum(d$num_max_treedepth %||% 0L), total_iters)
)

# Diagnostic verdict — Claude can read this directly.
ess <- s$ess_bulk %||% 0
rhat <- s$rhat %||% Inf
divg <- sum(d$num_divergent %||% 0L) / total_iters
Expand All @@ -216,26 +227,48 @@ jobs:
cat("\n=== End SUMMARY.txt ===\n")
' 2>&1 | tee "${OUT_DIR}/run.log"

# Always succeed at the workflow level — the SUMMARY.txt
# carries the pass/fail signal.
exit 0
env:
OUT_DIR: outputs/ci/phase0_n${{ inputs.n }}_run${{ github.run_id }}

- name: Run bimodality diagnostic
# Runs after the fit so the new RDS is available. Reads its own
# OUT_DIR from the positional argument we pass. Skips with a
# warning (not a fail) if the script or RDS is missing.
if: always()
env:
OUT_DIR: outputs/ci/phase0_n${{ inputs.n }}_run${{ github.run_id }}
run: |
set +e
if [ ! -f scripts/diagnostic_bimodality.R ]; then
echo "diagnostic_bimodality.R missing; skipping."
exit 0
fi
if [ ! -f "${OUT_DIR}/one_fit_n${N_SUBJECTS}_ci.rds" ]; then
echo "Fit RDS missing at ${OUT_DIR}; skipping diagnostic."
exit 0
fi
echo "Running diagnostic_bimodality.R on ${OUT_DIR}..."
Rscript scripts/diagnostic_bimodality.R "${OUT_DIR}" 2>&1 \
| tee "${OUT_DIR}/diagnostic_bimodality.log"
exit 0

- name: Commit outputs back to the branch
if: always()
run: |
set -euo pipefail
if [ ! -d outputs/ci ] || [ -z "$(ls -A outputs/ci 2>/dev/null)" ]; then
echo "outputs/ci/ is empty or missing; nothing to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add outputs/ci/
if git diff --cached --quiet; then
echo "No new outputs to commit."
exit 0
fi
# [skip ci] prevents the push from triggering other workflows
git commit -m "ci(phase0): n=${N_SUBJECTS} run ${GITHUB_RUN_ID} [skip ci]"
# Push to the branch we ran on
BRANCH="${GITHUB_REF#refs/heads/}"
git push origin "HEAD:${BRANCH}"

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ README_files
shigella.Rcheck/
shigella*.tar.gz
shigella*.tgz
commit.sh
gitconfig
47 changes: 30 additions & 17 deletions .lintr.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@


undesirable_functions <-
lintr::default_undesirable_functions |>
undesirable_functions <-
lintr::default_undesirable_functions |>
lintr::modify_defaults(

# following https://github.com/r-lib/devtools/blob/2aa51ef/.lintr.R:
# Base messaging
"message" = "use cli::cli_inform()",
Expand All @@ -18,32 +17,33 @@ undesirable_functions <-
"cli_alert_info" = "use cli::cli_inform()",
"cli_alert_success" = "use cli::cli_inform()",
"cli_alert_warning" = "use cli::cli_inform()",

library = paste(
"\nuse `::`, `usethis::use_import_from()`, or `withr::local_package()`",
"instead of modifying the global search path.",
"\nSee:\n",
"<https://r-pkgs.org/code.html#sec-code-r-landscape> and\n",
"<https://r-pkgs.org/testing-design.html#sec-testing-design-self-contained>",
"\nfor more details"
"\nfor more details."
),

structure = NULL
# see https://github.com/r-lib/lintr/pull/2227 and

structure = NULL,
browser = NULL
# see https://github.com/r-lib/lintr/pull/2227 and
# rebuttal https://github.com/r-lib/lintr/pull/2227#issuecomment-1800302675

)

# define snake_case with uppercase acronyms allowed;
# see https://github.com/r-lib/lintr/issues/2844 for details:
withr::local_package("rex")
snake_case_ACRO = rex::rex(
snake_case_ACROs1 <- rex::rex(
start,
maybe("."),
some_of(lower, digit) %or% some_of(upper, digit),
list(some_of(upper), maybe("s"), zero_or_more(digit)) %or% list(some_of(lower), zero_or_more(digit)),
zero_or_more(
"_",
some_of(lower, digit) %or% some_of(upper, digit)
list(some_of(upper), maybe("s"), zero_or_more(digit)) %or% list(some_of(lower), zero_or_more(digit))
),
end
)
Expand All @@ -54,7 +54,7 @@ linters <- lintr::linters_with_defaults(
lintr::redundant_equals_linter(),
lintr::pipe_consistency_linter(pipe = "|>"),
lintr::object_name_linter(
regexes = c(snake_case_ACRO = snake_case_ACRO)
regexes = c(snake_case_ACROs1 = snake_case_ACROs1)
),
lintr::undesirable_function_linter(
fun = undesirable_functions,
Expand All @@ -64,9 +64,22 @@ linters <- lintr::linters_with_defaults(

# prevent warnings from lintr::read_settings:
rm(undesirable_functions)
rm(snake_case_ACRO)
rm(snake_case_ACROs1)
exclusions <- list(
`data-raw` = list(
pipe_consistency_linter = Inf
)
pipe_consistency_linter = Inf,
undesirable_function_linter = Inf
),
vignettes = list(
undesirable_function_linter = Inf,
object_name_linter = Inf
),
"inst/examples" = list(
undesirable_function_linter = Inf
),
"tests/testthat.R" = list(
undesirable_function_linter = Inf
),
"quarto/mermaid-diagrams.qmd" = Inf

)
17 changes: 14 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,23 +1,34 @@
Package: shigella
Title: What the Package Does (One Line, Title Case)
Version: 0.0.0.9008
Title: Bayesian Modeling of Shigella Antibody Kinetics
Version: 0.0.0.9009
Authors@R: c(
person("Kwan Ho", "Lee", , "ksjlee@ucdavis.edu", role = c("aut", "cre")),
person("Douglas Ezra", "Morrison", , "demorrison@ucdavis.edu", role = c("aut"),
comment = c(ORCID = "0000-0002-7195-830X")))
Description: What the package does (one paragraph).
Description: Tools for multivariate Bayesian hierarchical modeling of
antibody response trajectories following confirmed Shigella infection,
supporting kinetic parameter estimation and serosurveillance
applications via Stan (cmdstanr) backends.
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
URL: https://ucd-serg.github.io/shigella/
Remotes:
stan-dev/cmdstanr,
UCD-SERG/serodynamics
Suggests:
cmdstanr,
knitr,
posterior,
rmarkdown,
serodynamics (>= 0.0.0.9011),
spelling,
testthat (>= 3.0.0)
Imports:
cli,
dplyr,
MASS,
tibble
VignetteBuilder: knitr
Depends:
R (>= 3.5)
Expand Down
8 changes: 8 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
# Generated by roxygen2: do not edit by hand

export(postprocess_stan_output)
export(prep_data_stan)
export(prep_priors_stan)
export(run_mod_stan)
export(sim_correlated_case_data)
export(write_status)
importFrom(stats,median)
importFrom(stats,rnorm)
Loading