Skip to content

Commit

Permalink
[Release] Version bumps and doc for 1.0 release (#61)
Browse files Browse the repository at this point in the history
* Bump versions

* Update getting-started to mention releases page

* Add version.hpp and version to model_info

* Update version.hpp
  • Loading branch information
WardBrian authored Dec 8, 2022
1 parent c7a425a commit 3f2e6f1
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 6 deletions.
2 changes: 1 addition & 1 deletion R/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: bridgestan
Title: BridgeStan, Accessing Stan Model Functions in R
Version: 0.0.1
Version: 1.0.0
Authors@R:
person(given="Brian", family="Ward", , "[email protected]", role = c("aut", "cre"))
License: BSD_3_clause
Expand Down
14 changes: 12 additions & 2 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,18 @@ Downloading BridgeStan
Installing BridgeStan is as simple as ensuring that the above requirements are installed and then downloading
the source repository.

Installing with ``git``
_______________________
Downloading a released archive
______________________________

Downloads of a complete copy of the source code and interfaces are available
on `our GitHub releases page <https://github.com/roualdes/bridgestan/releases>`__.

To use these, simply download the file associated with the version you wish to use,
and unzip its contents into the folder you would like BridgeStan to be in.


Installing the latest version with ``git``
__________________________________________

If you have ``git`` installed, you may download BridgeStan by navigating to the folder you'd like
BridgeStan to be in and running
Expand Down
2 changes: 1 addition & 1 deletion julia/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "BridgeStan"
uuid = "c88b6f0a-829e-4b0b-94b7-f06ab5908f5a"
authors = ["Brian Ward <[email protected]>", "Bob Carpenter <[email protected]", "Edward Roualdes <[email protected]>"]
version = "0.0.1"
version = "1.0.0"
2 changes: 1 addition & 1 deletion julia/docs/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[deps.BridgeStan]]
path = ".."
uuid = "c88b6f0a-829e-4b0b-94b7-f06ab5908f5a"
version = "0.1.0"
version = "1.0.0"

[[deps.Dates]]
deps = ["Printf"]
Expand Down
2 changes: 1 addition & 1 deletion python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = bridgestan
version = 0.0.1
version = 1.0.0

[options]
python_requires = >=3.9
Expand Down
2 changes: 2 additions & 0 deletions python/test/test_stanmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def test_model_info():
std_so = str(STAN_FOLDER / "stdnormal" / "stdnormal_model.so")
b = bs.StanModel(std_so)
assert "STAN_OPENCL" in b.model_info()
assert "BridgeStan version: 1." in b.model_info()



def test_param_num():
Expand Down
4 changes: 4 additions & 0 deletions src/model_rng.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "model_rng.hpp"
#include "version.hpp"
#include <stan/io/ends_with.hpp>
#include <stan/io/json/json_data.hpp>
#include <stan/io/array_var_context.hpp>
Expand Down Expand Up @@ -85,6 +86,9 @@ bs_model_rng::bs_model_rng(const char* data_file, unsigned int seed,
name_ = strdup(model_name_c);

std::stringstream info;
info << "BridgeStan version: " << bridgestan::MAJOR_VERSION << '.'
<< bridgestan::MINOR_VERSION << '.' << bridgestan::PATCH_VERSION
<< std::endl;
info << "Stan version: " << stan::MAJOR_VERSION << '.' << stan::MINOR_VERSION
<< '.' << stan::PATCH_VERSION << std::endl;

Expand Down
31 changes: 31 additions & 0 deletions src/version.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef BRIDGESTAN_VERSION_HPP
#define BRIDGESTAN_VERSION_HPP

#include <string>

#ifndef BRIDGESTAN_STRING_EXPAND
#define BRIDGESTAN_STRING_EXPAND(s) #s
#endif

#ifndef BRIDGESTAN_STRING
#define BRIDGESTAN_STRING(s) BRIDGESTAN_STRING_EXPAND(s)
#endif

#define BRIDGESTAN_MAJOR 1
#define BRIDGESTAN_MINOR 0
#define BRIDGESTAN_PATCH 0

namespace bridgestan {

/** Major version number for BridgeStan. */
const std::string MAJOR_VERSION = BRIDGESTAN_STRING(BRIDGESTAN_MAJOR);

/** Minor version number for BridgeStan. */
const std::string MINOR_VERSION = BRIDGESTAN_STRING(BRIDGESTAN_MINOR);

/** Patch version for BridgeStan. */
const std::string PATCH_VERSION = BRIDGESTAN_STRING(BRIDGESTAN_PATCH);

} // namespace bridgestan

#endif

0 comments on commit 3f2e6f1

Please sign in to comment.