Skip to content

Commit c36f280

Browse files
committedMay 4, 2024
Merge branch 'master' into expose_new_stan_args
2 parents e90fda4 + cc2e36d commit c36f280

28 files changed

+759
-160
lines changed
 

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

+4-17
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,9 @@ jobs:
4040
- uses: r-lib/actions/setup-r@v2.8.7
4141
- uses: r-lib/actions/setup-pandoc@v2.8.7
4242

43-
- name: Query dependencies
44-
run: |
45-
install.packages('remotes')
46-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
47-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
48-
shell: Rscript {0}
49-
50-
- name: Install dependencies
51-
run: |
52-
remotes::install_deps(dependencies = TRUE)
53-
remotes::install_cran("rcmdcheck")
54-
remotes::install_local(path = ".", INSTALL_opts = "--no-test-load")
55-
install.packages("curl")
56-
shell: Rscript {0}
43+
- uses: r-lib/actions/setup-r-dependencies@v2.8.7
44+
with:
45+
extra-packages: any::rcmdcheck, local::.
5746

5847
- uses: Vampire/setup-wsl@v3
5948
with:
@@ -82,11 +71,9 @@ jobs:
8271
sessioninfo::session_info(pkgs, include_base = TRUE)
8372
shell: Rscript {0}
8473

85-
- name: Check
74+
- uses: r-lib/actions/check-r-package@v2.8.7
8675
env:
8776
_R_CHECK_CRAN_INCOMING_: false
88-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
89-
shell: Rscript {0}
9077

9178
- name: Show testthat output
9279
if: always()

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

+10-38
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ jobs:
2525
config:
2626
- {os: macOS-latest, r: 'devel', rtools: ''}
2727
- {os: macOS-latest, r: 'release', rtools: ''}
28-
- {os: windows-latest, r: 'devel', rtools: ''}
29-
- {os: windows-latest, r: 'release', rtools: ''}
30-
- {os: windows-latest, r: 'oldrel', rtools: '42'}
31-
- {os: ubuntu-20.04, r: 'devel', rtools: ''}
32-
- {os: ubuntu-20.04, r: 'release', rtools: ''}
33-
- {os: ubuntu-20.04, r: 'oldrel', rtools: ''}
28+
- {os: windows-latest, r: 'devel', rtools: '44'}
29+
- {os: windows-latest, r: 'release', rtools: '44'}
30+
- {os: windows-latest, r: 'oldrel', rtools: '43'}
31+
- {os: ubuntu-latest, r: 'devel', rtools: ''}
32+
- {os: ubuntu-latest, r: 'release', rtools: ''}
33+
- {os: ubuntu-latest, r: 'oldrel', rtools: ''}
3434
env:
3535
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3636
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -49,42 +49,16 @@ jobs:
4949

5050
- uses: actions/checkout@v4
5151

52-
- name: Install system dependencies
53-
if: runner.os == 'Linux'
54-
run: |
55-
sudo apt-get update
56-
sudo apt-get install -y libcurl4-openssl-dev || true
57-
sudo apt-get install -y openmpi-bin openmpi-common libopenmpi-dev || true
58-
5952
- uses: r-lib/actions/setup-r@v2.8.7
6053
with:
6154
r-version: ${{ matrix.config.r }}
6255
rtools-version: ${{ matrix.config.rtools }}
63-
- uses: r-lib/actions/setup-pandoc@v2.8.7
6456

65-
- name: Query dependencies
66-
run: |
67-
install.packages('remotes')
68-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
69-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
70-
shell: Rscript {0}
57+
- uses: r-lib/actions/setup-pandoc@v2.8.7
7158

72-
- name: Cache R packages
73-
if: runner.os != 'Windows'
74-
uses: actions/cache@v4
59+
- uses: r-lib/actions/setup-r-dependencies@v2.8.7
7560
with:
76-
path: ${{ env.R_LIBS_USER }}
77-
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
78-
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
79-
80-
- name: Install dependencies
81-
run: |
82-
Sys.setenv("MAKEFLAGS"="-j2")
83-
remotes::install_deps(dependencies = TRUE)
84-
remotes::install_cran("rcmdcheck")
85-
remotes::install_local(path = ".")
86-
install.packages("curl")
87-
shell: Rscript {0}
61+
extra-packages: any::rcmdcheck, local::.
8862

8963
- name: Install cmdstan
9064
run: |
@@ -99,11 +73,9 @@ jobs:
9973
sessioninfo::session_info(pkgs, include_base = TRUE)
10074
shell: Rscript {0}
10175

102-
- name: Check
76+
- uses: r-lib/actions/check-r-package@v2.8.7
10377
env:
10478
_R_CHECK_CRAN_INCOMING_: false
105-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
106-
shell: Rscript {0}
10779

10880
- name: Show testthat output
10981
if: always()

‎.github/workflows/Test-coverage.yaml

+18-63
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ name: Test coverage
1313
- master
1414

1515
jobs:
16-
test-coverage-ubuntu:
17-
name: "Linux"
16+
test-coverage:
1817
if: "! contains(github.event.head_commit.message, '[ci skip]')"
19-
runs-on: ubuntu-20.04
18+
runs-on: ${{ matrix.config.os }}
19+
20+
name: ${{ matrix.config.os }}
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
config:
26+
- { os: windows-latest }
27+
- { os: ubuntu-latest }
2028
env:
2129
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2230
NOT_CRAN: true
@@ -37,77 +45,24 @@ jobs:
3745
- uses: r-lib/actions/setup-r@v2.8.7
3846
- uses: r-lib/actions/setup-pandoc@v2.8.7
3947

40-
- name: Install Ubuntu dependencies
41-
run: |
42-
sudo apt-get update
43-
sudo apt-get install -y libcurl4-openssl-dev
44-
sudo apt-get install -y openmpi-bin openmpi-common openmpi-doc libopenmpi-dev
45-
46-
- name: Query dependencies
47-
run: |
48-
install.packages('remotes')
49-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
50-
shell: Rscript {0}
51-
52-
- name: Cache R packages
53-
uses: actions/cache@v4
48+
- uses: r-lib/actions/setup-r-dependencies@v2.8.7
5449
with:
55-
path: ${{ env.R_LIBS_USER }}
56-
key: ubuntu-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
57-
restore-keys: ubuntu-r-4.0-1-
58-
59-
- name: Install dependencies
60-
run: |
61-
install.packages(c("remotes", "curl"), dependencies = TRUE)
62-
remotes::install_local(path = ".", INSTALL_opts = "--no-test-load")
63-
remotes::install_deps(dependencies = TRUE)
64-
remotes::install_cran("covr")
65-
remotes::install_cran("gridExtra")
66-
shell: Rscript {0}
50+
extra-packages: any::rcmdcheck, local::., any::covr, any::gridExtra
6751

6852
- name: Install cmdstan
6953
run: |
7054
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
7155
cmdstanr::install_cmdstan(cores = 2)
7256
shell: Rscript {0}
7357

74-
- name: Test coverage
58+
- name: Test coverage (Linux)
59+
if: runner.os == 'Linux'
7560
run: covr::codecov(type = "tests")
7661
shell: Rscript {0}
7762

78-
test-coverage-windows:
79-
name: "Windows"
80-
if: "! contains(github.event.head_commit.message, '[ci skip]')"
81-
runs-on: windows-latest
82-
env:
83-
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
84-
NOT_CRAN: true
85-
steps:
86-
- uses: actions/checkout@v4
87-
88-
- uses: r-lib/actions/setup-r@v2.8.7
89-
90-
- uses: r-lib/actions/setup-pandoc@v2.8.7
91-
92-
- name: Query dependencies
93-
run: |
94-
install.packages('remotes')
95-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
96-
shell: Rscript {0}
97-
98-
- name: Install dependencies
99-
run: |
100-
install.packages(c("remotes", "curl"), dependencies = TRUE)
101-
remotes::install_local(path = ".")
102-
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
103-
cmdstanr::install_cmdstan(cores = 2, overwrite = TRUE)
104-
remotes::install_deps(dependencies = TRUE)
105-
remotes::install_cran("covr")
106-
remotes::install_cran("gridExtra")
107-
shell: Rscript {0}
108-
109-
- name: Test coverage
63+
- name: Test coverage (Windows)
64+
if: runner.os == 'Windows'
11065
run: |
111-
options(covr.gcov = 'C:/rtools40/mingw64/bin/gcov.exe');
66+
options(covr.gcov = 'C:/rtools44/mingw64/bin/gcov.exe');
11267
covr::codecov(type = "tests", function_exclusions = "sample_mpi")
11368
shell: Rscript {0}

‎.github/workflows/cmdstan-tarball-check.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
matrix:
2424
config:
2525
- {os: macOS-latest, r: 'release', rtools: ''}
26-
- {os: windows-latest, r: 'release', rtools: '42'}
26+
- {os: windows-latest, r: 'release', rtools: '44'}
2727
- {os: ubuntu-20.04, r: 'release', rtools: ''}
2828
env:
2929
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true

‎DESCRIPTION

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Authors@R:
1010
person(given = "Andrew", family = "Johnson", role = c("aut", "cre"),
1111
email = "andrew.johnson@arjohnsonau.com",
1212
comment = c(ORCID = "0000-0001-7000-8065")),
13+
person(given = "Steve", family = "Bronder", role = "aut"),
1314
person(given = "Ben", family = "Bales", role = "ctb"),
1415
person(given = "Mitzi", family = "Morris", role = "ctb"),
1516
person(given = "Mikhail", family = "Popov", role = "ctb"),
@@ -18,7 +19,8 @@ Authors@R:
1819
email = "will.landau@gmail.com", comment = c(ORCID = "0000-0003-1878-3253")),
1920
person(given = "Jacob", family = "Socolar", role = "ctb"),
2021
person(given = "Martin", family = "Modrák", role = "ctb"),
21-
person(given = "Steve", family = "Bronder", role = "ctb"))
22+
person(given = "Ven", family = "Popov", role = "ctb")
23+
)
2224
Description: A lightweight interface to 'Stan' <https://mc-stan.org>.
2325
The 'CmdStanR' interface is an alternative to 'RStan' that calls the command
2426
line interface for compilation and running algorithms instead of interfacing

‎NAMESPACE

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ S3method(as_draws,CmdStanMCMC)
66
S3method(as_draws,CmdStanMLE)
77
S3method(as_draws,CmdStanPathfinder)
88
S3method(as_draws,CmdStanVB)
9+
S3method(process_init,"function")
10+
S3method(process_init,CmdStanLaplace)
11+
S3method(process_init,CmdStanMCMC)
12+
S3method(process_init,CmdStanMLE)
13+
S3method(process_init,CmdStanPathfinder)
14+
S3method(process_init,CmdStanVB)
15+
S3method(process_init,default)
16+
S3method(process_init,draws)
17+
S3method(process_init,list)
918
export(as.CmdStanDiagnose)
1019
export(as.CmdStanGQ)
1120
export(as.CmdStanLaplace)
@@ -40,3 +49,4 @@ export(write_stan_json)
4049
export(write_stan_tempfile)
4150
import(R6)
4251
importFrom(posterior,as_draws)
52+
importFrom(stats,aggregate)

0 commit comments

Comments
 (0)