Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fully delegate canonicalisation to cmdstanr #1396

Merged
merged 3 commits into from
Aug 25, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
bump cmdstanr, don't pollute tmp
  • Loading branch information
andrjohns committed Aug 25, 2022

Verified

This commit was signed with the committer’s verified signature.
adamdehaven Adam DeHaven
commit 9a99b8cfe0e1ceecf9ffd9dd20413b7a949fc599
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ Imports:
Suggests:
testthat (>= 0.9.1),
emmeans (>= 1.4.2),
cmdstanr (>= 0.4.0),
cmdstanr (>= 0.5.0),
projpred (>= 2.0.0),
RWiener,
rtdists,
5 changes: 3 additions & 2 deletions R/backends.R
Original file line number Diff line number Diff line change
@@ -621,10 +621,11 @@ file_refit_options <- function() {

.canonicalize_stan_model <- function(stan_file, overwrite_file = TRUE) {
cmdstan_mod <- cmdstanr::cmdstan_model(stan_file, compile = FALSE)
out <- capture.output(
out <- utils::capture.output(
cmdstan_mod$format(canonicalize = list("deprecations",
"braces",
"parentheses"),
overwrite_file = overwrite_file))
overwrite_file = overwrite_file,
backup = FALSE))
paste0(out, collapse = "\n")
}