cmdstan 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0438de041affa64ca7db73cd65f35b67a80a389d76ed70d73a294f877db0071
4
- data.tar.gz: 06da4d0a6ca5f5a84d05c442ef860efc2b0f0d619645139dede04a924564c5c6
3
+ metadata.gz: 3b919404c064aa08c6766d3718c168f70ef422e32d66eebf6de84b901e244d2c
4
+ data.tar.gz: 70f11779bdb74a2d0ba2a95ba6ba37c05cd5e637422667474765f3bdbfca2efe
5
5
  SHA512:
6
- metadata.gz: 86c6687ba6802f658b865f8f94a56d7f2bdc24abc5dc5606dc389b5fba2558648b1dc41b3b3762c4d38478caed95d47e35ba15a6434379af5d8f9eb5a1173f74
7
- data.tar.gz: f52cc26a90504161e3f5df6848509a42341f0725e23936741447962f6777ea8706998870ee2d2b6e8c8efd50e08778678e45b9273ce4a7aabe848c54bbbd7ad2
6
+ metadata.gz: 1238805b583a22b5aef689a70ce0eba43a270e9a090ce531038ac8e93a2d386f202ff800ef80247cb118edf37ef06fe5a9230c9589070a8b6f5e463c6a19363d
7
+ data.tar.gz: 7e7c0cdf1b481a400844605eded2822d644eb441f85875bd65d9b91d856150dd40d9a83671d19d2693c28dbae4c17a4af3b07a336a133909c30f7fa9802b2b90
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.6 (2021-02-08)
2
+
3
+ - Updated CmdStan to 2.26.0
4
+
1
5
  ## 0.1.5 (2020-11-21)
2
6
 
3
7
  - Added `tbb` to path for Linux
data/LICENSE.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  BSD 3-Clause License
2
2
 
3
3
  Copyright (c) 2019, Stan Developers and their Assignees
4
- Copyright (c) 2020, Andrew Kane
4
+ Copyright (c) 2020-2021, Andrew Kane
5
5
  All rights reserved.
6
6
 
7
7
  Redistribution and use in source and binary forms, with or without
@@ -3,8 +3,8 @@ require "fileutils"
3
3
  require "net/http"
4
4
  require "tmpdir"
5
5
 
6
- version = "2.25.0"
7
- checksum = "6bd90c6513d386f22007750f136c3f8db0132aa3e80c7298095516c68ab95a4a"
6
+ version = "2.26.0"
7
+ checksum = "0bc5529a4818e70ef8181191a515ea5e1a6fce326dda41a040f99deb89bcb663"
8
8
  url = "https://github.com/stan-dev/cmdstan/releases/download/v#{version}/cmdstan-#{version}.tar.gz"
9
9
 
10
10
  $stdout.sync = true
data/lib/cmdstan/mcmc.rb CHANGED
@@ -25,11 +25,12 @@ module CmdStan
25
25
  end
26
26
 
27
27
  def summary
28
- csv_file = Tempfile.new
29
- run_command "#{CmdStan.path}/bin/stansummary#{extension}", "--csv_file=#{csv_file.path}", *@output_files.map(&:path)
28
+ # add suffix since path can't already exist
29
+ path = "#{Tempfile.new.path}.csv"
30
+ run_command "#{CmdStan.path}/bin/stansummary#{extension}", "--csv_filename=#{path}", *@output_files.map(&:path)
30
31
 
31
32
  result = {}
32
- CSV.foreach(csv_file.path, headers: true, converters: :numeric) do |row|
33
+ CSV.foreach(path, headers: true, converters: :numeric) do |row|
33
34
  value = row.to_h
34
35
  name = value.delete("name")
35
36
  result[name] = value if name == "lp__" || !name.end_with?("__")
data/lib/cmdstan/model.rb CHANGED
@@ -61,7 +61,7 @@ module CmdStan
61
61
  args << "num_samples=#{sampling_iters.to_i}" if sampling_iters
62
62
  args += ["algorithm=hmc", "adapt", "engaged=1"]
63
63
 
64
- run_command *args
64
+ run_command(*args)
65
65
 
66
66
  output_files << output_file
67
67
  end
@@ -99,7 +99,7 @@ module CmdStan
99
99
  args << "algorithm=#{algorithm.to_s.downcase}" if algorithm
100
100
  args << "iter=#{iter.to_i}" if iter
101
101
 
102
- run_command *args
102
+ run_command(*args)
103
103
 
104
104
  MLE.new(output_file)
105
105
  end
@@ -1,3 +1,3 @@
1
1
  module CmdStan
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,59 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmdstan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
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-21 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ">="
18
- - !ruby/object:Gem::Version
19
- version: '0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: minitest
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '5'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '5'
11
+ date: 2021-02-08 00:00:00.000000000 Z
12
+ dependencies: []
55
13
  description:
56
- email: andrew@chartkick.com
14
+ email: andrew@ankane.org
57
15
  executables: []
58
16
  extensions:
59
17
  - ext/cmdstan/extconf.rb
@@ -89,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
89
47
  - !ruby/object:Gem::Version
90
48
  version: '0'
91
49
  requirements: []
92
- rubygems_version: 3.1.4
50
+ rubygems_version: 3.2.3
93
51
  signing_key:
94
52
  specification_version: 4
95
53
  summary: Bayesian inference for Ruby, powered by CmdStan