Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Renormalize line endings
7308ea2330e787e0da8479b8a0c58547a7644b9b
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
106 changes: 53 additions & 53 deletions .github/workflows/touchstone-receive.yaml
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
name: Continuous Benchmarks (Receive)
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
on:
pull_request:
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
config: ${{ steps.read_touchstone_config.outputs.config }}
steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
fetch-depth: 0
- id: read_touchstone_config
run: |
echo "config=$(jq -c . ./touchstone/config.json)" >> $GITHUB_OUTPUT
build:
needs: prepare
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- ${{ fromJson(needs.prepare.outputs.config) }}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
R_REPOS: https://production.r-multiverse.org/2025-12-15,${{ matrix.config.rspm }}
RENV_CONFIG_REPOS_OVERRIDE: https://production.r-multiverse.org/2025-12-15,${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
USE_BUNDLED_LIBUV: 1
steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: lorenzwalthert/touchstone/actions/receive@main
with:
r-version: ${{ matrix.config.r }}
extra-repositories: |
https://production.r-multiverse.org/2025-12-15
${{ matrix.config.rspm }}
name: Continuous Benchmarks (Receive)

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

on:
pull_request:

jobs:
prepare:
runs-on: ubuntu-latest
outputs:
config: ${{ steps.read_touchstone_config.outputs.config }}
steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
fetch-depth: 0

- id: read_touchstone_config
run: |
echo "config=$(jq -c . ./touchstone/config.json)" >> $GITHUB_OUTPUT

build:
needs: prepare
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- ${{ fromJson(needs.prepare.outputs.config) }}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}
R_REPOS: https://production.r-multiverse.org/2025-12-15,${{ matrix.config.rspm }}
RENV_CONFIG_REPOS_OVERRIDE: https://production.r-multiverse.org/2025-12-15,${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
USE_BUNDLED_LIBUV: 1
steps:
- name: Checkout repo
uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: lorenzwalthert/touchstone/actions/receive@main
with:
r-version: ${{ matrix.config.r }}
extra-repositories: |
https://production.r-multiverse.org/2025-12-15
${{ matrix.config.rspm }}
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Additional_repositories:
Config/testthat/edition: 3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
Config/roxygen2/version: 8.0.0
Config/roxygen2/version: 8.1.0
10 changes: 6 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ export(stanflow_deps)
export(stanflow_logo)
export(stanflow_update)
export(stdlib_funs)
importFrom(utils,citation)
importFrom(utils,packageDescription)
importFrom(utils,person)
importFrom(utils,toBibtex)
importFrom(utils,
citation,
packageDescription,
person,
toBibtex
)
importFrom(withr,local_options)
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Updated posterior citation. (#39)
* Added dry run option to see what function calls will do before execution. (#41)
* Improved scanning performance
* `setup_cmdstanr()` no longer auto-fixes the CmdStan toolchain (breaking).

# stanflow 0.1.0

Expand Down
14 changes: 7 additions & 7 deletions R/interfaces.R
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ setup_cmdstanr <- function(
toolchain_ok <- tryCatch(
{
run_side_effect(
"check and fix the CmdStan toolchain",
"check the CmdStan toolchain",
{
cmdstanr::check_cmdstan_toolchain(fix = TRUE, quiet = quiet)
cmdstanr::check_cmdstan_toolchain(quiet = quiet)
},
code = sprintf(
"cmdstanr::check_cmdstan_toolchain(fix = TRUE, quiet = %s)",
"cmdstanr::check_cmdstan_toolchain(quiet = %s)",
deparse1(quiet)
)
)
Expand All @@ -258,7 +258,7 @@ setup_cmdstanr <- function(
c(
"CmdStan toolchain check failed.",
"i" = "You need a C++ compiler (RTools on Windows, Xcode on Mac) to run Stan.",
"i" = "Re-run {.code cmdstanr::check_cmdstan_toolchain(fix = TRUE, quiet = FALSE)} for detailed diagnostics."
"i" = "Re-run {.code cmdstanr::check_cmdstan_toolchain(quiet = FALSE)} for detailed diagnostics."
)
)
}
Expand Down Expand Up @@ -405,7 +405,7 @@ setup_rstan <- function(
run_side_effect <- dry_runner(dry_run)

run_side_effect(
"configure {.pkg rstan}: set {.code options(mc.cores = {cores})} and {.code rstan::rstan_options(auto_write = {rstan_auto_write})}",
"configure {.pkg rstan}",
{
options(mc.cores = cores)
rstan::rstan_options(auto_write = rstan_auto_write)
Expand Down Expand Up @@ -443,7 +443,7 @@ setup_brms <- function(
brms_backend <- match.arg(brms_backend, c("cmdstanr", "rstan"))

run_side_effect(
"configure {.pkg brms}: set {.code options(mc.cores = {cores})} and {.code options(brms.backend = '{brms_backend}')}",
"configure {.pkg brms}",
{
options(mc.cores = cores)
options(brms.backend = brms_backend)
Expand Down Expand Up @@ -483,7 +483,7 @@ setup_rstanarm <- function(

set_mc_cores <- function(run_side_effect, cores, pkg) {
run_side_effect(
"configure {.pkg {pkg}}: set {.code options(mc.cores = {cores})}",
"configure {.pkg {pkg}}",
{
options(mc.cores = cores)
cli::format_inline(
Expand Down
2 changes: 1 addition & 1 deletion R/update.R
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ stanflow_update <- function(
# Muffle all warnings except cannot install
package_list <- paste0("{.pkg ", behind$package, "}", collapse = ", ")
run_side_effect(
"install {package_list}",
paste0("install ", package_list),
{
withCallingHandlers(
utils::install.packages(behind$package, repos = repos, quiet = TRUE),
Expand Down
Loading
Loading