scs 0.2.0 → 0.2.1

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: a3d577e9f481249087408220ac5a609c9eef5efcd8befd5b81368f3b84daca30
4
- data.tar.gz: 1d1a05bcb8326b8a5f06a29715bae4a9788fdf9ee416410d33134da102efc1e9
3
+ metadata.gz: 6336ca9d1433f92e77c259062923fa2ce96888d215a6070b5e780730b621571a
4
+ data.tar.gz: 264f3030f2ddf34565c33dba5d1af5dc6ac8bc11f7ef1f4cf9130646825b48b5
5
5
  SHA512:
6
- metadata.gz: 50e6df0f1faef9c92d5659557b0dcaf4fc1342ea224a61fee1f45abf3c22031314ccc7c61ec7c4756722d29f02f30dddb3e5dc0bdba3e1618e3b6f600622f38b
7
- data.tar.gz: 6a2e023b50207693e349dac6f159fe97d58dfc3fa3dc095c6a580da24c61a39b795b412c4120b3950ffa3f3ffec5e1b93319ca537e0b645e431ad02fb96943c7
6
+ metadata.gz: 6a8ffbd1707be25370186a84542eec3b37f13e452a7f202b04c1386c11fb0df05ccadf86d4268a926cae2266e6b21daf3f19925731bf71eb934360e5772f7b9a
7
+ data.tar.gz: 850a9e91d62bade7ac1e644745f7eb3b9194d09f894ed6e54f29ab3923d746a8f6ee641c99789f9a0768563e280654b585293ff9bbd9ada09a9f613d4155434a
@@ -1,3 +1,8 @@
1
+ ## 0.2.1 (2019-11-29)
2
+
3
+ - Fixed installation on Windows
4
+ - Removed dependency on rake for installation
5
+
1
6
  ## 0.2.0 (2019-11-16)
2
7
 
3
8
  - First release
data/README.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  :fire: Supports many different [problem types](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver)
6
6
 
7
+ [![Build Status](https://travis-ci.org/ankane/scs.svg?branch=master)](https://travis-ci.org/ankane/scs) [![Build status](https://ci.appveyor.com/api/projects/status/wyn0cbgs0k5vg5tq/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/scs/branch/master)
8
+
7
9
  ## Installation
8
10
 
9
11
  Add this line to your application’s Gemfile:
@@ -12,6 +14,8 @@ Add this line to your application’s Gemfile:
12
14
  gem 'scs'
13
15
  ```
14
16
 
17
+ If installation fails, you may need to install [dependencies](#dependencies).
18
+
15
19
  ## Getting Started
16
20
 
17
21
  Prep the problem
@@ -25,7 +29,7 @@ And solve it
25
29
 
26
30
  ```ruby
27
31
  solver = SCS::Solver.new
28
- result = solver.solve(data, cone)
32
+ solver.solve(data, cone)
29
33
  ```
30
34
 
31
35
  ## Settings
@@ -56,6 +60,16 @@ SCS comes with two solvers: a direct solver which uses a cached LDL factorizatio
56
60
  SCS::Solver.new(indirect: true)
57
61
  ```
58
62
 
63
+ ## Dependencies
64
+
65
+ BLAS and LAPACK are required for SCS.
66
+
67
+ ```sh
68
+ sudo apt-get install libblas-dev liblapack-dev
69
+ ```
70
+
71
+ On Heroku, use the [heroku-apt-buildpack](https://github.com/heroku/heroku-buildpack-apt).
72
+
59
73
  ## Resources
60
74
 
61
75
  - [Conic Optimization via Operator Splitting and Homogeneous Self-Dual Embedding](https://web.stanford.edu/~boyd/papers/scs.html)
@@ -73,10 +87,10 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
73
87
  - Write, clarify, or fix documentation
74
88
  - Suggest or add new features
75
89
 
76
- To get started with development and testing:
90
+ To get started with development:
77
91
 
78
92
  ```sh
79
- git clone https://github.com/ankane/scs.git
93
+ git clone --recursive https://github.com/ankane/scs.git
80
94
  cd scs
81
95
  bundle install
82
96
  bundle exec rake compile
@@ -0,0 +1,29 @@
1
+ require "mkmf"
2
+
3
+ def run(command)
4
+ puts ">> #{command}"
5
+ unless system(command)
6
+ raise "Command failed"
7
+ end
8
+ end
9
+
10
+ def inreplace(file, pattern, replacement)
11
+ contents = File.read(file)
12
+ File.write(file, contents.gsub(pattern, replacement))
13
+ end
14
+
15
+ arch = RbConfig::CONFIG["arch"]
16
+ puts "Arch: #{arch}"
17
+
18
+ scs = File.expand_path("../../vendor/scs", __dir__)
19
+ Dir.chdir(scs) do
20
+ case arch
21
+ when /mingw/
22
+ inreplace("scs.mk", "USE_LAPACK = 1", "USE_LAPACK = 0")
23
+ run "ridk exec make"
24
+ else
25
+ run "make"
26
+ end
27
+ end
28
+
29
+ File.write("Makefile", dummy_makefile("scs").join)
@@ -1,3 +1,3 @@
1
1
  module SCS
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-17 00:00:00.000000000 Z
11
+ date: 2019-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,13 +70,13 @@ description:
70
70
  email: andrew@chartkick.com
71
71
  executables: []
72
72
  extensions:
73
- - ext/scs/Rakefile
73
+ - ext/scs/extconf.rb
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - CHANGELOG.md
77
77
  - LICENSE.txt
78
78
  - README.md
79
- - ext/scs/Rakefile
79
+ - ext/scs/extconf.rb
80
80
  - lib/scs.rb
81
81
  - lib/scs/ffi.rb
82
82
  - lib/scs/solver.rb
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  - !ruby/object:Gem::Version
197
197
  version: '0'
198
198
  requirements: []
199
- rubygems_version: 3.0.6
199
+ rubygems_version: 3.0.3
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: SCS - the splitting conic solver - for Ruby
@@ -1,11 +0,0 @@
1
- desc "Compile extensions"
2
- task :compile do
3
- scs = File.expand_path("../../vendor/scs", __dir__)
4
- Dir.chdir(scs) do
5
- sh "make"
6
- end
7
- end
8
-
9
- unless Rake::Task.task_defined?("default")
10
- task default: :compile
11
- end