Skip to content

Commit bb0c049

Browse files
committed
Merge branch 'master' into pr/1138
2 parents fd6c563 + cb6d218 commit bb0c049

119 files changed

Lines changed: 2934 additions & 1291 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Install cmdstan
6161
run: |
62-
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
62+
cmdstanr::check_cmdstan_toolchain()
6363
cmdstanr::install_cmdstan(cores = 2, wsl = TRUE, overwrite = TRUE)
6464
shell: Rscript {0}
6565

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

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ jobs:
3535
config:
3636
- {os: macOS-latest, r: 'devel', opencl: true}
3737
- {os: macOS-latest, r: 'release', opencl: true}
38+
- {os: macos-26, r: 'release', opencl: false}
39+
- {os: macos-15-intel, r: 'release', opencl: false}
3840
- {os: windows-latest, r: 'devel' }
3941
- {os: windows-latest, r: 'release'}
42+
- {os: windows-2022, r: '4.1'}
4043
- {os: windows-latest, r: 'oldrel'}
4144
- {os: ubuntu-latest, r: 'devel', opencl: true}
4245
- {os: ubuntu-latest, r: 'release', opencl: true}
@@ -74,6 +77,28 @@ jobs:
7477
cache: "always"
7578
extra-packages: any::rcmdcheck, local::.
7679

80+
- name: Debug Windows toolchain resolution
81+
if: ${{ runner.os == 'Windows' }}
82+
run: |
83+
rtools_home <- cmdstanr:::rtools4x_home_path()
84+
candidates <- cmdstanr:::rtools4x_toolchain_candidates()
85+
selected <- cmdstanr:::rtools4x_toolchain_path()
86+
cat("R version: ", as.character(getRversion()), "\n", sep = "")
87+
cat("Rtools home: ", rtools_home, "\n", sep = "")
88+
cat("Toolchain candidates:\n")
89+
if (length(candidates) == 0) {
90+
cat(" - <none>\n")
91+
} else {
92+
cat(paste0(" - ", candidates), sep = "\n")
93+
cat("\n")
94+
}
95+
cat("Selected toolchain: ", selected, "\n", sep = "")
96+
selected_ok <- cmdstanr:::is_rtools4x_toolchain_usable(selected)
97+
if (!selected_ok) {
98+
stop("Resolved Windows toolchain path is not usable.")
99+
}
100+
shell: Rscript {0}
101+
77102
- name: Install POCL on Ubuntu Runners
78103
if: ${{ matrix.config.os == 'ubuntu-latest' }}
79104
run: |
@@ -91,7 +116,7 @@ jobs:
91116

92117
- name: Install cmdstan
93118
run: |
94-
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
119+
cmdstanr::check_cmdstan_toolchain()
95120
tarball_url <- Sys.getenv("CMDSTAN_TEST_TARBALL_URL")
96121
if (nzchar(tarball_url)) {
97122
cmdstanr::install_cmdstan(

.github/workflows/Test-coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555

5656
- name: Install cmdstan
5757
run: |
58-
cmdstanr::check_cmdstan_toolchain(fix = TRUE)
58+
cmdstanr::check_cmdstan_toolchain()
5959
cmdstanr::install_cmdstan(cores = 2)
6060
shell: Rscript {0}
6161

@@ -87,7 +87,7 @@ jobs:
8787
covr::to_cobertura(cov)
8888
shell: Rscript {0}
8989

90-
- uses: codecov/codecov-action@v5
90+
- uses: codecov/codecov-action@v6
9191
with:
9292
# Fail if error if not on PR, or if on PR and token is given
9393
fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}

DESCRIPTION

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Title: R Interface to 'CmdStan'
33
Version: 0.9.0.9000
44
Date: 2025-03-30
55
Authors@R:
6-
c(person(given = "Jonah", family = "Gabry", role = "aut",
6+
c(person(given = "Jonah", family = "Gabry", role = c("aut", "cre"),
77
email = "jgabry@gmail.com"),
88
person(given = "Rok", family = "Češnovar", role = "aut",
99
email = "rok.cesnovar@fri.uni-lj.si"),
10-
person(given = "Andrew", family = "Johnson", role = c("aut", "cre"),
10+
person(given = "Andrew", family = "Johnson", role = "aut",
1111
email = "andrew.johnson@arjohnsonau.com",
1212
comment = c(ORCID = "0000-0001-7000-8065")),
1313
person(given = "Steve", family = "Bronder", role = "aut"),
@@ -16,10 +16,12 @@ Authors@R:
1616
person(given = "Mikhail", family = "Popov", role = "ctb"),
1717
person(given = "Mike", family = "Lawrence", role = "ctb"),
1818
person(given = c("William", "Michael"), family = "Landau", role = "ctb",
19-
email = "will.landau@gmail.com", comment = c(ORCID = "0000-0003-1878-3253")),
19+
email = "will.landau@gmail.com", comment = c(ORCID = "0000-0003-1878-3253")),
2020
person(given = "Jacob", family = "Socolar", role = "ctb"),
2121
person(given = "Martin", family = "Modrák", role = "ctb"),
22-
person(given = "Ven", family = "Popov", role = "ctb")
22+
person(given = "Ven", family = "Popov", role = "ctb"),
23+
person("Visruth", "Srimath Kandali", role = "ctb"),
24+
person("Aki", "Vehtari", role = "ctb")
2325
)
2426
Description: A lightweight interface to 'Stan' <https://mc-stan.org>.
2527
The 'CmdStanR' interface is an alternative to 'RStan' that calls the command
@@ -36,12 +38,12 @@ RoxygenNote: 7.3.3
3638
Roxygen: list(markdown = TRUE, r6 = FALSE)
3739
SystemRequirements: CmdStan (https://mc-stan.org/users/interfaces/cmdstan)
3840
Depends:
39-
R (>= 3.5.0)
41+
R (>= 4.0.0)
4042
Imports:
4143
checkmate,
4244
data.table,
43-
jsonlite (>= 1.2.0),
44-
posterior (>= 1.4.1),
45+
jsonlite (>= 1.8.7),
46+
posterior (>= 1.5.0),
4547
processx (>= 3.5.0),
4648
R6 (>= 2.4.0),
4749
withr (>= 2.5.0),
@@ -56,6 +58,7 @@ Suggests:
5658
progressr,
5759
qs2,
5860
rmarkdown,
59-
testthat (>= 2.1.0),
61+
testthat (>= 3.3.0),
6062
Rcpp
6163
VignetteBuilder: knitr
64+
Config/testthat/edition: 3

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export(draws_to_csv)
3737
export(eng_cmdstan)
3838
export(install_cmdstan)
3939
export(print_example_program)
40+
export(print_stan_file)
4041
export(read_cmdstan_csv)
4142
export(rebuild_cmdstan)
4243
export(register_default_progress_handler)

NEWS.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# cmdstanr (development version)
22

3-
* Removed deprecated items (replacements in parentheses):
3+
* Informative error when exposing functions using names that are reserved
4+
keywords (@VisruthSK, #1154)
5+
* `save_cmdstan_config` and `save_metric` default to `FALSE` but can be
6+
set to `TRUE` for an entire R session via new global options. (#1159)
7+
* `cmdstan_model()` no longer fails when `MAKEFLAGS` enables directory-printing
8+
output while reading `STANCFLAGS` from `make`. (#1163)
9+
10+
* CmdStanModel objects created using `compile_model_methods = TRUE` that are
11+
then saved and reloaded no longer error in model fitting methods. Model methods
12+
are recompiled lazily if needed. (#1158)
13+
14+
* CmdStan versions older than 2.35.0 are no longer supported. (#1144)
15+
* Minimum R version increased to 4.0.0. (#1144)
16+
* Removed legacy Windows toolchain paths for older CmdStan releases. (#1144)
17+
* `CMDSTANR_USE_MSYS_TOOLCHAIN` is now deprecated and ignored (with a warning). (#1144)
18+
19+
* Removed deprecated items (replacements in parentheses). (#1061)
420
- `read_sample_csv()` (`read_cmdstan_csv()`)
521
- `write_stan_tempfile()` (`write_stan_file()`)
622
- `jacobian_adjustment` argument to `fit$log_prob()` and similar methods (`jacobian` argument)

0 commit comments

Comments
 (0)