Skip to content

Commit

Permalink
Prepare v0.8.0 release (#974)
Browse files Browse the repository at this point in the history
* Prepare for v0.8.0 release

* Cherry-pick fix for Onedrive path issues
  • Loading branch information
andrjohns authored May 18, 2024
1 parent b271b7b commit 12fe0f8
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 11 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
^\.github$
^vignettes/articles-online-only$
^release-prep\.R$
^\.vscode$
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: cmdstanr
Title: R Interface to 'CmdStan'
Version: 0.7.1
Date: 2024-01-09
Version: 0.8.0
Date: 2024-05-18
Authors@R:
c(person(given = "Jonah", family = "Gabry", role = "aut",
email = "jsg2201@columbia.edu"),
Expand Down Expand Up @@ -36,7 +36,7 @@ RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE, r6 = FALSE)
SystemRequirements: CmdStan (https://mc-stan.org/users/interfaces/cmdstan)
Depends:
R (>= 4.0.0)
R (>= 3.5.0)
Imports:
checkmate,
data.table,
Expand Down
42 changes: 39 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,46 @@
# cmdstanr 0.7.0.9000
# cmdstanr 0.8.0.9000

Items for next release go here

# cmdstanr 0.8.0

## Major new features

* Add functionality for passing `CmdStanFit` objects as initial values by @SteveBronder in #937

## Other improvements

* Add compatibility with CmdStan 2.35 by @andrjohns in #972
* Add `show_messages` and `show_exceptions` arguments to all methods for controlling output by @andrjohns in #897
* Drop RcppEigen dependency, implement basic Eigen -> C++ interop by @andrjohns in #899
* Add compatibility with CmdStan 2.34 by @andrjohns in #905 #910
* Add a format argument to the `unconstrain_draws()` method to specify draws format of return by @andrjohns in #886
* Align `cmdstanr` EBFMI diagnostic threshold with CmdStan by @andrjohns in #892
* Add global option `cmdstanr_print_line_numbers` to add line number to model printing by @sbfnk in #967
* Add new CmdStan arguments `save_metric` and `save_cmdstan_config` by @venpopov in #932
* Add documentation for CmdStanR global options by @jgabry in #951
* Add documentation for how to obtain structured output similar to `rstan::extract()` using a combination of `cmdstanr` and `posterior` by @jgabry in #955
* Added coercion generics for CmdStanFit objects by @gowerc in #943
* `psis_resample` and `calculate_lp` arguments added to Pathfinder method by @SteveBronder in #903
* Documentation and tests for LOO method updated by @jgabry in #923
* Global option `cmdstanr_warn_inits` added to disable warnings about partially specified initial values by @jgabry in #913
* Updates to MCMC `output_dir` documentation by @jgabry in #929

## Bugfixes

* Fix broken link in OpenCL documentation by @eipi10 in #908
* Fix a minor typo in the README by @jgabry in #911
* Make exported RNG functions respect changes to R's seed by @andrjohns in #973
* Optimisations for model methods functions by @andrjohns in #960
* Bugfix for passing function for initial values with Pathfinder method and default `num_paths` by @andrjohns in #964
* Continue with compilation if `compile_stanalone=TRUE` but no functions are found by @jgabry in #956
* Update tests and CI for compatibility with MacOS ARM64 by @andrjohns in #958
* Fix handling of `inv_metric` argument with only 1 parameter by @venpopov in #935
* Fixes for compatibility with RTools44 by @andrjohns in #952 #959

# cmdstanr 0.7.0

## Major new features
## Major new features

* New `laplace` method by @jgabry in #800
* New `pathfinder` method by @SteveBronder in #848
Expand Down Expand Up @@ -47,7 +83,7 @@ Items for next release go here
### Major new features

* New `expose_functions()` method to expose Stan functions to R by @andrjohns in #702. See `?expose_functions`.
* New methods for accessing log_prob, grad_log_prob, hessian, un/constrain variables by @andrjohns in #701. See `?init_model_methods`.
* New methods for accessing log_prob, grad_log_prob, hessian, un/constrain variables by @andrjohns in #701. See `?init_model_methods`.

### Other changes

Expand Down
2 changes: 1 addition & 1 deletion R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ cmdstan_model <- function(stan_file = NULL, exe_file = NULL, compile = TRUE, ...
#' |**Method**|**Description**|
#' |:----------|:---------------|
#' [`$sample()`][model-method-sample] | Run CmdStan's `"sample"` method, return [`CmdStanMCMC`] object. |
#' [`$sample_mpi()`][model-method-sample_mpi] | Run CmdStan's `"sample"` method with [MPI](https://mc-stan.org/math/mpi.html), return [`CmdStanMCMC`] object. |
#' [`$sample_mpi()`][model-method-sample_mpi] | Run CmdStan's `"sample"` method with [MPI](https://mc-stan.org/math/md_doxygen_2parallelism__support_2mpi__parallelism.html), return [`CmdStanMCMC`] object. |
#' [`$optimize()`][model-method-optimize] | Run CmdStan's `"optimize"` method, return [`CmdStanMLE`] object. |
#' [`$variational()`][model-method-variational] | Run CmdStan's `"variational"` method, return [`CmdStanVB`] object. |
#' [`$pathfinder()`][model-method-pathfinder] | Run CmdStan's `"pathfinder"` method, return [`CmdStanPathfinder`] object. |
Expand Down
17 changes: 15 additions & 2 deletions R/path.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ cmdstan_default_install_path <- function(old = FALSE, wsl = FALSE) {
file.path(paste0(wsl_dir_prefix(wsl = TRUE), wsl_home_dir()), ".cmdstan")
} else {
if (old) {
file.path(Sys.getenv("HOME"), ".cmdstanr")
file.path(.home_path(), ".cmdstanr")
} else {
file.path(Sys.getenv("HOME"), ".cmdstan")
file.path(.home_path(), ".cmdstan")
}
}
}
Expand Down Expand Up @@ -240,3 +240,16 @@ fake_cmdstan_version <- function(version) {
reset_cmdstan_version <- function() {
.cmdstanr$VERSION <- read_cmdstan_version(cmdstan_path())
}

.home_path <- function() {
home <- Sys.getenv("HOME")
if (os_is_windows()) {
userprofile <- Sys.getenv("USERPROFILE")
h_drivepath <- file.path(Sys.getenv("HOMEDRIVE"), Sys.getenv("HOMEPATH"))
win_home <- ifelse(userprofile == "", h_drivepath, userprofile)
if (win_home != "") {
home <- win_home
}
}
home
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ releases.
* Modularity: CmdStanR runs Stan's algorithms and lets downstream modules do the
analysis.

* Flexible [BSD-3 license](https://opensource.org/license/bsd-3-clause/).
* Flexible [BSD-3 license](https://opensource.org/license/bsd-3-clause).


### Installation
Expand Down
2 changes: 1 addition & 1 deletion man/CmdStanModel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 12fe0f8

Please sign in to comment.