Releases: roualdes/bridgestan
v2.0.0
BridgeStan 2.0.0
This version of BridgeStan features several breaking changes, primarily to the C API which is used "under the hood", but also to how models with generated quantities must be called. Additionally, many "quality of life" features have been added, ranging from const
correctness in the C API, to vastly improved error messages in the interfaces.
The BridgeStan documentation has been updated, and old versions of the docs are now available via a dropdown at the top of each page.
Interface changes
Breaking Changes
- For all interfaces, the
param_constrain
family of functions now accept anrng
argument of typeStanRNG
. This is required ifinclude_gq
is set in the function, otherwise it may be omitted. These RNGs are now used in any RNG function calls inside thegenerated quantities
block, rather than using an RNG stored inside the BridgeStan model object. - This means that the
param_constrain
function is now thread-safe if each thread has its ownStanRNG
. See the documentation for your preferred interface for more on how to instantiateStanRNG
s.
Other Changes
- BridgeStan has updated to Stan 2.32.1
- Error messages are now properly reported by each language's preferred exception mechanism. This means no more "See C++ stderr for details" messages when an error occurs.
- All interfaces:
print()
statements inside of Stan models will now be directed tostdout
instead ofstderr
. - Python:
print()
statements inside of Stan models are re-directed tosys.stdout
by default to allow them to appear in things like Jupyter notebooks. See thecapture_stan_prints
argument to the StanModel constructor for more details.
C API
Breaking Changes
- Mirroring the above changes for
param_constrain
, thebs_model_rng
type has been split into two types,bs_model
andbs_rng
. The creation and destruction functions have been renamed tobs_model_construct
/bs_rng_construct
andbs_model_destruct
/bs_rng_desctruct
. - The
param_constrain
function accepts a newbs_rng*
argument, which can beNULL
ifinclude_gq
is false. - Any function in the C API which can fail (those which return integer return codes) now accept an additional argument of type
char **
. If a non-null pointer is provided, it will be set to a newly allocated error message string if a failure occurs. Error messages are no longer printed tostderr
. These strings must later be freed by calling a new functionbs_free_error_msg
.
Other Changes
- The C API functions now properly mark
bs_model*
arguments asconst
where appropriate. With theparam_constrain
changes, this means all functions except forbs_model_destruct
take aconst
pointer now. - Three new constants are available in the C API -
bs_major_version
,bs_minor_version
,bs_patch_version
. - The data argument to the
bs_model_construct
function can now beNULL
, indicating "no data". - A new function,
bs_set_print_callback
is available. This can be used to provide a function which is called whenprint
statements in the Stan model are run. This is primarily used in the Python interface to re-direct tosys.stdout
. - The C API now uses the
stdbool.h
header file'sbool
type, rather thantypedef int bool
Full Changelog: v1.0.2...v2.0.0
v1.0.2
What's Changed
- Bump r-lib/actions from 2.3.1 to 2.4.0 by @dependabot in #74
- Do not create ChainableStacks except when threading by @WardBrian in #75
- Add a few more tests to the R interface by @WardBrian in #76
- example.R: add missing instructions by @jgabry in #78
- bridgestan.R: fix a few doc typos and use consistent punctuation by @jgabry in #77
- Make sure -fPIC is set globally so Sundials can link by @WardBrian in #81
- Update list of test models in Makefile by @WardBrian in #82
- Python: Download bridgestan source if needed by @WardBrian in #80
New Contributors
Full Changelog: v1.0.1...v1.0.2
BridgeStan v1.0.1
What's Changed
The major changes for this version are that the Python interface is available on PyPI (https://pypi.org/project/bridgestan/) and the Julia interface is being added to the Julia General Registry (pending a 3-day waiting period).
- fix links to python & julia examples in readme by @mike-lawrence in #63
- change JSON object to JSON string literal for all BridgeStan owned files by @roualdes in #66
- Add Julia doc to emphasize compile_model args in StanModel; re issue #64 by @roualdes in #65
- Download bridgestan repo as artifact for BridgeStan.jl by @sethaxen in #70
- Add compatibility with Julia LTS by @sethaxen in #72
- Add unified release action by @WardBrian in #73
New Contributors
- @mike-lawrence made their first contribution in #63
- @sethaxen made their first contribution in #70
Full Changelog: v1.0.0...v1.0.1
BridgeStan v1.0.0
The initial release of BridgeStan.
BridgeStan provides efficient in-memory access through Python, Julia, and R to the methods of a Stan model, including log densities, gradients, Hessians, and constraining and unconstraining transforms.
Check out the documentation at https://roualdes.github.io/bridgestan/