Skip to content

Commit 183fd49

Browse files
authored
Merge pull request #399 from stan-dev/add-cmdstanr-to-gha
Added cmdstanr to GHA
2 parents 62fce06 + ada278c commit 183fd49

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,18 @@ jobs:
4141
r-version: ${{ matrix.config.r }}
4242
http-user-agent: ${{ matrix.config.http-user-agent }}
4343
use-public-rspm: true
44+
extra-repositories: |
45+
https://community.r-multiverse.org
46+
https://stan-dev.r-universe.dev
4447
4548
- uses: r-lib/actions/setup-r-dependencies@v2
4649
with:
47-
extra-packages: any::rcmdcheck, any::BH, any::RcppEigen, any::vdiffr
50+
extra-packages: any::rcmdcheck, any::BH, any::RcppEigen, any::vdiffr, any::cmdstanr
4851
needs: check
4952

53+
- name: Install CmdStan
54+
run: Rscript -e "cmdstanr::install_cmdstan()"
55+
5056
- uses: r-lib/actions/check-r-package@v2
5157
with:
5258
upload-snapshots: true

.github/workflows/test-coverage.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,16 @@ jobs:
2323
- uses: r-lib/actions/setup-r@v2
2424
with:
2525
use-public-rspm: true
26+
extra-repositories: 'https://stan-dev.r-universe.dev'
2627

2728
- uses: r-lib/actions/setup-r-dependencies@v2
2829
with:
29-
extra-packages: any::covr, any::xml2, any::vdiffr
30+
extra-packages: any::covr, any::xml2, any::vdiffr, any::cmdstanr
3031
needs: coverage
3132

33+
- name: Install CmdStan
34+
run: Rscript -e "cmdstanr::install_cmdstan()"
35+
3236
- name: Test coverage
3337
run: |
3438
cov <- covr::package_coverage(

DESCRIPTION

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Imports:
4444
tidyselect,
4545
utils
4646
Suggests:
47+
cmdstanr,
4748
ggdist,
4849
ggfortify,
4950
gridExtra (>= 2.2.1),
@@ -65,3 +66,4 @@ VignetteBuilder: knitr
6566
Encoding: UTF-8
6667
Roxygen: list(markdown = TRUE)
6768
Config/testthat/edition: 3
69+
Additional_repositories: https://stan-dev.r-universe.dev/

vignettes/visual-mcmc-diagnostics.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ schools_mod_ncp <- stan_model("schools_mod_ncp.stan")
154154
We then fit the model by calling Stan's MCMC algorithm using the `sampling`
155155
function (the increased `adapt_delta` param is to make the sampler a bit more "careful" and avoid false positive divergences),
156156
```{r fit-models-hidden, results='hide', message=FALSE}
157-
fit_cp <- sampling(schools_mod_cp, data = schools_dat, seed = 803214055, control = list(adapt_delta = 0.9))
157+
fit_cp <- sampling(schools_mod_cp, data = schools_dat, seed = 20251208, control = list(adapt_delta = 0.9))
158158
fit_ncp <- sampling(schools_mod_ncp, data = schools_dat, seed = 457721433, control = list(adapt_delta = 0.9))
159159
```
160160
and extract a `iterations x chains x parameters` array of posterior draws with

0 commit comments

Comments
 (0)