Skip to content

Commit ef09fa1

Browse files
authored
Add release notes for 1.2.1 (#729)
* Add release notes for 1.2.1 * Update CI * Improve doc on deprecations * Update wording * Add line to changelog
1 parent e7e6121 commit ef09fa1

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,14 @@ jobs:
103103
run: |
104104
install_cmdstan -h
105105
install_cxx_toolchain -h
106-
python -c "import cmdstanpy; cmdstanpy.install_cmdstan(version='${{ needs.get-cmdstan-version.outputs.version }}', cores=2)"
106+
python -c "import cmdstanpy; cmdstanpy.install_cmdstan(version='${{ needs.get-cmdstan-version.outputs.version }}', cores=4)"
107107
108108
- name: Install CmdStan (Windows)
109109
if: matrix.os == 'windows-latest'
110110
run: |
111111
install_cmdstan -h
112112
install_cxx_toolchain -h
113-
$env:TBB_CXXFLAGS = "-D_UCRT"
114-
python -m cmdstanpy.install_cmdstan --version ${{ needs.get-cmdstan-version.outputs.version }} --cores 2
115-
echo "TBB_CXXFLAGS+=-D_UCRT" >> ~/.cmdstan/cmdstan-${{ needs.get-cmdstan-version.outputs.version }}/make/local
113+
python -m cmdstanpy.install_cmdstan --version ${{ needs.get-cmdstan-version.outputs.version }} --cores 4
116114
117115
- name: Run tests
118116
run: |

cmdstanpy/model.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ class CmdStanModel:
8080
"""
8181
The constructor method allows model instantiation given either the
8282
Stan program source file or the compiled executable, or both.
83-
By default, the constructor will compile the Stan program on instantiation
84-
unless the argument ``compile=False`` is specified.
85-
The set of constructor arguments are:
83+
This will compile the model if provided a Stan file and no executable,
8684
8785
:param model_name: Model name, used for output file names.
8886
Optional, default is the base filename of the Stan program file.
87+
Deprecated: In version 2.0.0, model name cannot be
88+
specified and will always be taken from executable.
8989
9090
:param stan_file: Path to Stan program file.
9191
@@ -94,9 +94,8 @@ class CmdStanModel:
9494
the compiled executable file are specified, the base filenames
9595
must match, (but different directory locations are allowed).
9696
97-
:param compile: Whether or not to compile the model. Default is ``True``.
98-
If set to the string ``"force"``, it will always compile even if
99-
an existing executable is found.
97+
:param force_compile: If ``True``, always compile, even if there
98+
is an existing executable file for this model.
10099
101100
:param stanc_options: Options for stanc compiler, specified as a Python
102101
dictionary containing Stanc3 compiler option name, value pairs.
@@ -109,6 +108,13 @@ class CmdStanModel:
109108
:param user_header: A path to a header file to include during C++
110109
compilation.
111110
Optional.
111+
112+
:param compile: Whether or not to compile the model. Default is ``True``.
113+
If set to the string ``"force"``, it will always compile even if
114+
an existing executable is found.
115+
Deprecated: Use ``force_compile`` instead. The ability to instantiate
116+
a CmdStanModel without an executable will be removed in version 2.0.0.
117+
112118
"""
113119

114120
def __init__(
@@ -126,14 +132,16 @@ def __init__(
126132
"""
127133
Initialize object given constructor args.
128134
129-
:param model_name: Model name, used for output file names.
135+
:param model_name: Deprecated. Model name, used for output file names.
130136
:param stan_file: Path to Stan program file.
131137
:param exe_file: Path to compiled executable file.
132-
:param compile: Whether or not to compile the model.
138+
:param force_compile: Whether or not to force recompilation if
139+
executable file already exists.
133140
:param stanc_options: Options for stanc compiler.
134141
:param cpp_options: Options for C++ compiler.
135142
:param user_header: A path to a header file to include during C++
136143
compilation.
144+
:param compile: Deprecated. Whether or not to compile the model.
137145
"""
138146
self._name = ''
139147
self._stan_file = None
@@ -446,6 +454,9 @@ def compile(
446454
_internal: bool = False,
447455
) -> None:
448456
"""
457+
Deprecated: To compile a model, use the :class:`~cmdstanpy.CmdStanModel`
458+
constructor or :func:`cmdstanpy.compile_stan_file()`.
459+
449460
Compile the given Stan program file. Translates the Stan code to
450461
C++, then calls the C++ compiler.
451462

docsrc/changes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ What's New
77

88
For full changes, see the `Releases page <https://github.com/stan-dev/cmdstanpy/releases>`_ on GitHub.
99

10+
CmdStanPy 1.2.1
11+
---------------
12+
13+
- Switched from :class:`numpy.random.RandomState` to :func:`~numpy.random.default_rng`.
14+
- Fixed minor doc typos.
15+
- Stan 2.34: Fixed parsing of unit_e output files.
16+
- Stan 2.34: Exposed new Pathfinder arguments.
17+
- Allow the ``vars`` argument to :meth:`CmdStanMCMC.draws_pd` to filter the ``chain__``, ``iter__``, and ``draws__`` columns.
18+
- Fixed a bug involving the interaction of the ``adapt_engaged`` and ``iter_warmup`` arguments to :meth:`CmdStanMCMC.sample`.
19+
20+
Reminder: The next non-bugfix release of CmdStanPy will be version 2.0, which will remove all existing deprecations.
21+
1022
CmdStanPy 1.2.0
1123
---------------
1224
- **New functionality**

0 commit comments

Comments
 (0)