cmdstan 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/cmdstan/utils.rb +12 -2
- data/lib/cmdstan/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0438de041affa64ca7db73cd65f35b67a80a389d76ed70d73a294f877db0071
|
4
|
+
data.tar.gz: 06da4d0a6ca5f5a84d05c442ef860efc2b0f0d619645139dede04a924564c5c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86c6687ba6802f658b865f8f94a56d7f2bdc24abc5dc5606dc389b5fba2558648b1dc41b3b3762c4d38478caed95d47e35ba15a6434379af5d8f9eb5a1173f74
|
7
|
+
data.tar.gz: f52cc26a90504161e3f5df6848509a42341f0725e23936741447962f6777ea8706998870ee2d2b6e8c8efd50e08778678e45b9273ce4a7aabe848c54bbbd7ad2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Bayesian inference for Ruby, powered by [CmdStan](https://github.com/stan-dev/cmdstan)
|
4
4
|
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://github.com/ankane/cmdstan/workflows/build/badge.svg?branch=master)](https://github.com/ankane/cmdstan/actions)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/lib/cmdstan/utils.rb
CHANGED
@@ -4,10 +4,16 @@ module CmdStan
|
|
4
4
|
|
5
5
|
def run_command(*args)
|
6
6
|
env = {}
|
7
|
+
# add tbb to path
|
8
|
+
tbblib = ENV["STAN_TBB"] || File.join(CmdStan.path, "stan", "lib", "stan_math", "lib", "tbb")
|
7
9
|
if windows?
|
8
|
-
#
|
9
|
-
|
10
|
+
# uses ; for separator
|
11
|
+
raise "Invalid TBB path" if tbblib.include?(";")
|
10
12
|
env["PATH"] = "#{tbblib};#{ENV["PATH"]}"
|
13
|
+
elsif !mac?
|
14
|
+
# uses : for separator
|
15
|
+
raise "Invalid TBB path" if tbblib.include?(":")
|
16
|
+
env["LD_LIBRARY_PATH"] = "#{tbblib}:#{ENV["LD_LIBRARY_PATH"]}"
|
11
17
|
end
|
12
18
|
|
13
19
|
# use an open3 method since it does escaping (like system)
|
@@ -27,6 +33,10 @@ module CmdStan
|
|
27
33
|
windows? ? ".exe" : ""
|
28
34
|
end
|
29
35
|
|
36
|
+
def mac?
|
37
|
+
RbConfig::CONFIG["host_os"] =~ /darwin/i
|
38
|
+
end
|
39
|
+
|
30
40
|
def windows?
|
31
41
|
Gem.win_platform?
|
32
42
|
end
|
data/lib/cmdstan/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmdstan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-11-
|
11
|
+
date: 2020-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|