Skip to content

Commit 669445e

Browse files
committed
Merge remote-tracking branch 'origin/master' into gq-timing
2 parents be63f37 + aa2b708 commit 669445e

124 files changed

Lines changed: 2898 additions & 1143 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/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,5 @@ new to you.
5454
Please note that the cmdstanr project follows the Stan project's
5555
[Code of Conduct](https://discourse.mc-stan.org/t/announcing-our-new-stan-code-of-conduct/23764).
5656
By contributing to this project you agree to abide by its terms.
57+
58+
All contributions must follow the [Stan AI Contribution Policy](https://github.com/stan-dev/stan/wiki/AI-Contribution-Policy).

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,7 @@ jobs:
3030
CMDSTANR_OPENCL_TESTS: true
3131

3232
steps:
33-
- name: cmdstan env vars
34-
run: |
35-
echo "CMDSTAN_PATH=${HOME}/.cmdstan" >> $GITHUB_ENV
36-
shell: bash
37-
38-
- uses: actions/checkout@v6
33+
- uses: actions/checkout@v7
3934

4035
- uses: r-lib/actions/setup-r@v2
4136
- uses: r-lib/actions/setup-pandoc@v2
@@ -44,7 +39,7 @@ jobs:
4439
with:
4540
extra-packages: any::rcmdcheck, local::.
4641

47-
- uses: Vampire/setup-wsl@v6
42+
- uses: Vampire/setup-wsl@v7
4843
with:
4944
distribution: Ubuntu-22.04
5045
wsl-version: 2
@@ -55,12 +50,18 @@ jobs:
5550
run: |
5651
sudo apt-get update
5752
sudo apt-get install -y build-essential libopenmpi-dev ocl-icd-opencl-dev pocl-opencl-icd
53+
sudo chmod 755 /root
5854
shell: wsl-bash {0}
5955

6056
- name: Install cmdstan
6157
run: |
6258
cmdstanr::check_cmdstan_toolchain()
6359
cmdstanr::install_cmdstan(cores = 2, wsl = TRUE, overwrite = TRUE)
60+
cat(
61+
paste0("CMDSTAN=", cmdstanr::cmdstan_path(), "\n"),
62+
file = Sys.getenv("GITHUB_ENV"),
63+
append = TRUE
64+
)
6465
shell: Rscript {0}
6566

6667
- name: Session info

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
- {os: ubuntu-latest, r: 'devel', opencl: true}
4545
- {os: ubuntu-latest, r: 'release', opencl: true}
4646
- {os: ubuntu-latest, r: 'oldrel', opencl: true}
47+
- {os: windows-11-arm, r: 'release'}
4748
env:
4849
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
4950
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -56,9 +57,13 @@ jobs:
5657
- name: cmdstan env vars
5758
run: |
5859
echo "CMDSTAN_PATH=${HOME}/.cmdstan" >> $GITHUB_ENV
60+
# GHA Windows ARM containers configured with RTOOLS45_HOME instead of RTOOLS45_AARCH64_HOME
61+
if [[ "${{ matrix.config.os }}" == "windows-11-arm" ]]; then
62+
echo "RTOOLS45_AARCH64_HOME=C:/rtools45-aarch64" >> $GITHUB_ENV
63+
fi
5964
shell: bash
6065

61-
- uses: actions/checkout@v6
66+
- uses: actions/checkout@v7
6267

6368
- uses: r-lib/actions/setup-r@v2
6469
with:
@@ -75,7 +80,7 @@ jobs:
7580
- uses: r-lib/actions/setup-r-dependencies@v2
7681
with:
7782
cache: "always"
78-
extra-packages: any::rcmdcheck, local::.
83+
extra-packages: any::rcmdcheck, local::., ${{ matrix.config.os == 'windows-11-arm' && 'RcppCore/RcppParallel' || '' }}
7984

8085
- name: Debug Windows toolchain resolution
8186
if: ${{ runner.os == 'Windows' }}

.github/workflows/Test-coverage.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
workflow: Test-coverage.yaml
4444
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
4545

46-
- uses: actions/checkout@v6
46+
- uses: actions/checkout@v7
4747

4848
- uses: r-lib/actions/setup-r@v2
4949
- uses: r-lib/actions/setup-pandoc@v2
@@ -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@v7
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 }}

.github/workflows/pkgdown.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
permissions:
2525
contents: write
2626
steps:
27-
- uses: actions/checkout@v6
27+
- uses: actions/checkout@v7
2828

2929
- uses: r-lib/actions/setup-pandoc@v2
3030

DESCRIPTION

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: cmdstanr
22
Title: R Interface to 'CmdStan'
3-
Version: 0.9.0.9000
3+
Version: 0.9.0.9001
44
Date: 2025-03-30
55
Authors@R:
66
c(person(given = "Jonah", family = "Gabry", role = c("aut", "cre"),
@@ -20,7 +20,8 @@ Authors@R:
2020
person(given = "Jacob", family = "Socolar", role = "ctb"),
2121
person(given = "Martin", family = "Modrák", role = "ctb"),
2222
person(given = "Ven", family = "Popov", role = "ctb"),
23-
person("Visruth", "Srimath Kandali", role = "ctb")
23+
person("Visruth", "Srimath Kandali", role = "ctb"),
24+
person("Aki", "Vehtari", role = "ctb")
2425
)
2526
Description: A lightweight interface to 'Stan' <https://mc-stan.org>.
2627
The 'CmdStanR' interface is an alternative to 'RStan' that calls the command
@@ -33,15 +34,14 @@ URL: https://mc-stan.org/cmdstanr/, https://discourse.mc-stan.org
3334
BugReports: https://github.com/stan-dev/cmdstanr/issues
3435
Encoding: UTF-8
3536
LazyData: true
36-
RoxygenNote: 7.3.3
3737
Roxygen: list(markdown = TRUE, r6 = FALSE)
3838
SystemRequirements: CmdStan (https://mc-stan.org/users/interfaces/cmdstan)
3939
Depends:
4040
R (>= 4.0.0)
4141
Imports:
4242
checkmate,
4343
data.table,
44-
jsonlite (>= 1.2.0),
44+
jsonlite (>= 1.8.7),
4545
posterior (>= 1.5.0),
4646
processx (>= 3.5.0),
4747
R6 (>= 2.4.0),
@@ -55,6 +55,8 @@ Suggests:
5555
loo (>= 2.0.0),
5656
qs2,
5757
rmarkdown,
58-
testthat (>= 2.1.0),
58+
testthat (>= 3.3.0),
5959
Rcpp
6060
VignetteBuilder: knitr
61+
Config/testthat/edition: 3
62+
Config/roxygen2/version: 8.0.0

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_knitr_engine)

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# cmdstanr (development version)
22

3+
* `pathfinder()` now respects `save_single_paths = TRUE` instead of always
4+
passing `0` to CmdStan.
5+
* `pathfinder()` now uses `threads` argument (`num_threads` is deprecated),
6+
to be consistent with other methods.
37
* Informative error when exposing functions using names that are reserved
48
keywords (@VisruthSK, #1154)
59
* `save_cmdstan_config` and `save_metric` default to `FALSE` but can be
610
set to `TRUE` for an entire R session via new global options. (#1159)
11+
* `save_metric_files()` now gives an informative error when metric files were not created and keeps saved metric files after the fitted model is garbage-collected. (#1021)
712
* `cmdstan_model()` no longer fails when `MAKEFLAGS` enables directory-printing
813
output while reading `STANCFLAGS` from `make`. (#1163)
14+
* `laplace()` no longer overwrites the internally generated optimizer CSV when
15+
`mode = NULL` and `output_basename` is supplied. The internally generated
16+
optimizer CSV now uses the filename `<output_basename>-mode-1.csv`.
917

1018
* CmdStanModel objects created using `compile_model_methods = TRUE` that are
1119
then saved and reloaded no longer error in model fitting methods. Model methods

0 commit comments

Comments
 (0)