stan-dev / cmdstanpy

CmdStanPy is a lightweight interface to Stan for Python users which provides the necessary objects and functions to compile a Stan program and fit the model to data using CmdStan.
BSD 3-Clause "New" or "Revised" License
149 stars 67 forks source link

cmdstan version - always check for release candidates? #755

Closed mitzimorris closed 1 month ago

mitzimorris commented 1 month ago

Summary:

if a release candidate for the next version is present, should this be the default CmdStan version?

Description:

current behavior - Python session 1, install latest RC

>>> cmdstanpy.install_cmdstan(version='2.35.0-rc3')
CmdStan install directory: /Users/mitzi/.cmdstan
CmdStan version 2.35.0-rc3 already installed
Test model compilation
True
>>> quit

session 2 - which version?

(stan-alone) ~> python
Python 3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:35:20) [Clang 16.0.6 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cmdstanpy
>>> cmdstanpy.cmdstan_version()
(2, 34)
>>> cmdstanpy.install_cmdstan(version='2.35.0-rc3')
CmdStan install directory: /Users/mitzi/.cmdstan
CmdStan version 2.35.0-rc3 already installed
Test model compilation
True
>>> cmdstanpy.cmdstan_version()
(2, 35)
>>> 

either behavior is fine by me.

WardBrian commented 1 month ago

Currently we (attempt to?) sort RCs behind the eventual release:

https://github.com/stan-dev/cmdstanpy/blob/4f3968723e2457d20aa2a72133bec7731fb832db/cmdstanpy/utils/cmdstan.py#L107-L114

mitzimorris commented 1 month ago

sounds good. let's not change it.