sciruby 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/CHANGES +5 -0
- data/CONTRIBUTING.md +6 -3
- data/README.md +17 -11
- data/Rakefile +1 -1
- data/gems.yml +113 -34
- data/lib/sciruby/autoload.rb +10 -6
- data/lib/sciruby/gems.rb +8 -2
- data/lib/sciruby/version.rb +1 -1
- data/sciruby.gemspec +3 -5
- data/scripts/deploy +1 -1
- data/scripts/gems.slim +82 -31
- data/scripts/helper.rb +86 -17
- data/scripts/test +15 -10
- metadata +21 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6213f46112349dd0ee6c1aec4ab40a5764238506
|
4
|
+
data.tar.gz: 56d7ff8a77d1f4857703f9981121a7cc8c6d3805
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c42d783ed409a3ea39c174204b6896792558d7019d00094d465812ac8f2d5306b78bd3f7fc1236984c2b063b50bb0a88e60c7dfeeeb24bfed5e799b3e3af8d53
|
7
|
+
data.tar.gz: a6492cf1b2d5d6a323b4aba5c1b4ea83793ee4049c64466cc1a23171d9b3eb4f99f5729e94d4a0506d3a6350ae00e3942249aefaaf85194322064aca22904aee
|
data/.travis.yml
CHANGED
@@ -11,12 +11,14 @@ matrix:
|
|
11
11
|
|
12
12
|
before_install:
|
13
13
|
- sudo apt-get update -qq
|
14
|
-
- sudo apt-get install -qq gnuplot-nox libgsl0-dev libsqlite3-dev libatlas-base-dev
|
14
|
+
- sudo apt-get install -qq gnuplot-nox libgsl0-dev libsqlite3-dev libatlas-base-dev libmagickcore-dev
|
15
15
|
- sudo ln -s /usr/lib/libtoolize /usr/lib/libtool
|
16
16
|
|
17
17
|
env:
|
18
18
|
global:
|
19
19
|
- secure: "Wr93642ujssq2+lTxWiAR0u3Y50MkNfq0jcEjPn9g2A9QQw8UitXZvtGjWa7VK8Cw2iJM7NQdY0G/eE+SBqGQ2d/NyDRwBdLUrQHBILWHeJFHoQnHcfgcGWoXVg2ztxkL6mmo8B5XpKm+ZEh4uYlZYiwp41VegmpmcuxWE0R1N0="
|
20
|
+
- secure: "JXusYvgkICUl5+cMsB73dyi8n+Eo4XX+XGPydGa3ut8Znf6BG41u58afFfzQQBwWREQMT8ch0DKbytNJahR1ljFgW6T9iKLw7LRxisT0D/nv5GHnJS0GxNb+zoOlhkAKVIsqVXg482AThahaGB7El7MX4GtGuDXbNRQmpp778Sw="
|
21
|
+
- secure: "JGBNlzoawWbbwliHj4HfH38y6MDygEO68v2tYIuSrMavpjiKzOqU7IsQEtr8kxTrUDFQ2i9ptvCo7ApCihZazYfRCYIj9G2FYYYNOQQQcTBvkhh/4W1xcnOkoLcTkXNzXyiGcG3/nZVVcug7lJ2GicWpqMO/0mFIsEHX9cFAVd8="
|
20
22
|
|
21
23
|
script: bundle exec rake test && bundle exec rake deploy
|
22
24
|
|
data/CHANGES
CHANGED
data/CONTRIBUTING.md
CHANGED
@@ -6,13 +6,14 @@ This guide covers way in which you can contribute.
|
|
6
6
|
|
7
7
|
There are various ways in which you can improve SciRuby. Coding and documentation are the two primary possibilities and participate in the [mailing list][mailing-list] -- suggesting ideas and changes is very important!
|
8
8
|
|
9
|
-
Apart from adding features and functionality, you can also create tests
|
9
|
+
Apart from adding features and functionality, you can also create tests, guides on how to do something using SciRuby, document the libraries and help find and fix bugs.
|
10
10
|
|
11
|
-
Start by visiting our [issue tracker](https://github.com/SciRuby/sciruby/issues?state=open)
|
11
|
+
Start by visiting our [issue tracker](https://github.com/SciRuby/sciruby/issues?state=open) and the
|
12
|
+
[status list of the various gems](http://gems.sciruby.com). If you want to start contributing, there's probably something with which you can help.
|
12
13
|
|
13
14
|
## Projects
|
14
15
|
|
15
|
-
SciRuby is an umbrella for many other projects in Ruby.
|
16
|
+
SciRuby is an umbrella for many other projects in Ruby. The most important one at the time is [NMatrix][nmatrix], as it's very hard to create some scientific library that doesn't need a good numerical linear algebra library to deal with vectors and matrices.
|
16
17
|
|
17
18
|
So, the SciRuby subprojects are, in no particular order:
|
18
19
|
|
@@ -21,6 +22,7 @@ So, the SciRuby subprojects are, in no particular order:
|
|
21
22
|
- [Distribution][distribution]: Diverse statistical distributions. Uses C (statistics2/GSL) or Java extensions when available.
|
22
23
|
- [Integration][integration]: Integration methods.
|
23
24
|
- [Minimization][minimization]: Various minimization algorithms in pure Ruby.
|
25
|
+
- [IRuby][iruby]: Ruby kernel for the IPython/Jupyter notebook
|
24
26
|
|
25
27
|
## Documentation
|
26
28
|
|
@@ -43,4 +45,5 @@ Before commiting any code, you *MUST* read our [Contributor Agreement](http://gi
|
|
43
45
|
[distribution]: https://github.com/SciRuby/distribution
|
44
46
|
[integration]: https://github.com/SciRuby/integration
|
45
47
|
[minimization]: https://github.com/SciRuby/minimization
|
48
|
+
[iruby]: https://github.com/SciRuby/iruby
|
46
49
|
[rdoc]: http://rdoc.rubyforge.org/
|
data/README.md
CHANGED
@@ -4,34 +4,40 @@ Tools for Scientific Computing in Ruby
|
|
4
4
|
|
5
5
|
* [Website](http://sciruby.com)
|
6
6
|
* [NMatrix](http://github.com/SciRuby/nmatrix)
|
7
|
-
* [List of gems](
|
8
|
-
* [Travis
|
7
|
+
* [List of scientific gems](http://gems.sciruby.com)
|
8
|
+
* [Travis CI](https://travis-ci.org/SciRuby/sciruby)
|
9
9
|
|
10
10
|
## Description
|
11
11
|
|
12
|
-
This gem acts as a meta gem which provides collects multiple scientific gems, including numeric and visualization libraries.
|
12
|
+
This gem acts as a meta gem which provides collects multiple [scientific gems](http://gems.sciruby.com), including numeric and visualization libraries.
|
13
13
|
|
14
14
|
## Getting started
|
15
15
|
|
16
16
|
Installation:
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
~~~
|
19
|
+
gem install sciruby
|
20
|
+
gem install sciruby-full
|
21
|
+
~~~
|
20
22
|
|
21
23
|
If you want to have a full-blown installation, install `sciruby-full`.
|
22
24
|
|
23
25
|
Start a notebook server:
|
24
26
|
|
25
|
-
|
27
|
+
~~~
|
28
|
+
iruby notebook
|
29
|
+
~~~
|
26
30
|
|
27
31
|
Enter commands:
|
28
32
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
+
~~~ ruby
|
34
|
+
require 'sciruby'
|
35
|
+
# Scientific gems are auto loaded, you can use them directly!
|
36
|
+
plot = Nyaplot::Plot.new
|
37
|
+
sc = plot.add(:scatter, [0,1,2,3,4], [-1,2,-3,4,-5])
|
38
|
+
~~~
|
33
39
|
|
34
|
-
Take a look at [gems.yml](gems.yml) or the [list of gems](
|
40
|
+
Take a look at [gems.yml](gems.yml) or the [list of gems](http://gems.sciruby.com) for interesting gems which are included in `sciruby-full`.
|
35
41
|
|
36
42
|
## License
|
37
43
|
|
data/Rakefile
CHANGED
data/gems.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
ai4r:
|
3
|
-
category:
|
3
|
+
category: ai
|
4
4
|
description: Artificial intelligence
|
5
5
|
module: Ai4r
|
6
6
|
version: "~> 1.13"
|
@@ -15,6 +15,17 @@ awesome_print:
|
|
15
15
|
category: utilities
|
16
16
|
description: Pretty object printing
|
17
17
|
version: "~> 1.6"
|
18
|
+
bibsync:
|
19
|
+
category: publishing
|
20
|
+
description: Bibliography synchronization
|
21
|
+
module: BibSync
|
22
|
+
version: "~> 0.0"
|
23
|
+
bibtex-ruby:
|
24
|
+
category: publishing
|
25
|
+
description: BibTeX parser
|
26
|
+
module: BibTeX
|
27
|
+
require: bibtex
|
28
|
+
version: "~> 4.0"
|
18
29
|
bio:
|
19
30
|
category: biology
|
20
31
|
description: Bioinformatics suite
|
@@ -26,14 +37,15 @@ cassowary:
|
|
26
37
|
exclude: Native dependencies
|
27
38
|
module: Cassowary
|
28
39
|
classifier:
|
29
|
-
category:
|
40
|
+
category: ai
|
30
41
|
description: Machine learning
|
31
42
|
module: Classifier
|
32
43
|
version: "~> 1.3"
|
33
44
|
cmath:
|
34
45
|
category: algebra
|
35
46
|
description: Stdlib cmath module
|
36
|
-
|
47
|
+
module: CMath
|
48
|
+
owner: stdlib
|
37
49
|
daru:
|
38
50
|
category: data
|
39
51
|
description: Dataframe library
|
@@ -45,19 +57,20 @@ darwinning:
|
|
45
57
|
module: Darwinning
|
46
58
|
version: "~> 0.0"
|
47
59
|
decisiontree:
|
48
|
-
category:
|
60
|
+
category: ai
|
49
61
|
description: Machine learning
|
50
62
|
module: DecisionTree
|
51
63
|
version: "~> 0.5"
|
52
64
|
distribution:
|
53
65
|
category: statistics
|
54
66
|
description: Statistical distributions
|
55
|
-
maintainer: sciruby
|
56
67
|
module: Distribution
|
68
|
+
owner: sciruby
|
57
69
|
version: "~> 0.7"
|
58
70
|
extendmatrix:
|
59
71
|
category: algebra
|
60
72
|
description: Helper methods for Matrix
|
73
|
+
owner: sciruby
|
61
74
|
version: "~> 0.4"
|
62
75
|
gga4r:
|
63
76
|
category: optimization
|
@@ -74,23 +87,39 @@ gnuplot:
|
|
74
87
|
description: Plotting library
|
75
88
|
module: Gnuplot
|
76
89
|
version: "~> 2.6"
|
90
|
+
gruff:
|
91
|
+
category: plotting
|
92
|
+
description: Plotting library
|
93
|
+
module: Gruff
|
94
|
+
version: "~> 0.6"
|
95
|
+
histogram:
|
96
|
+
category: statistics
|
97
|
+
description: Histogram method
|
98
|
+
module: Histogram
|
99
|
+
version: "~> 0.2"
|
77
100
|
integration:
|
78
101
|
category: numerics
|
79
102
|
description: Numerical integration
|
80
|
-
maintainer: sciruby
|
81
103
|
module: Integration
|
104
|
+
owner: sciruby
|
82
105
|
version: "~> 0.1"
|
83
106
|
irtruby:
|
84
|
-
category:
|
107
|
+
category: ai
|
85
108
|
description: Machine learning
|
86
109
|
exclude: Not available as a gem
|
87
110
|
module: IRT
|
88
111
|
iruby:
|
89
|
-
category:
|
112
|
+
category: ui
|
90
113
|
description: Ruby kernel for Jupyter
|
91
|
-
maintainer: sciruby
|
92
114
|
module: IRuby
|
115
|
+
owner: sciruby
|
93
116
|
version: "~> 0.2"
|
117
|
+
liblinear-ruby:
|
118
|
+
category: ai
|
119
|
+
description: Linear classifier
|
120
|
+
module: Liblinear
|
121
|
+
require: liblinear
|
122
|
+
version: "~> 0.0"
|
94
123
|
lpsolve:
|
95
124
|
category: optimization
|
96
125
|
description: Linear solver
|
@@ -104,32 +133,49 @@ mathgl:
|
|
104
133
|
matrix:
|
105
134
|
category: algebra
|
106
135
|
description: Stdlib matrix module
|
107
|
-
|
108
|
-
|
136
|
+
module:
|
137
|
+
- Matrix
|
138
|
+
- Vector
|
139
|
+
owner: stdlib
|
140
|
+
mdarray:
|
141
|
+
category: numerics
|
142
|
+
description: Numerical matrix library
|
143
|
+
exclude: Requires JRuby
|
144
|
+
module: MDArray
|
145
|
+
measurable:
|
146
|
+
category: ai
|
147
|
+
description: Distance measures for machine learning
|
148
|
+
module: Measurable
|
149
|
+
version: "~> 0.0"
|
150
|
+
mikon:
|
151
|
+
category: data
|
152
|
+
description: Dataframe library
|
153
|
+
module: Mikon
|
154
|
+
version: "~> 0.0"
|
109
155
|
minimization:
|
110
156
|
category: numerics
|
111
157
|
description: Numerical minimization
|
112
|
-
maintainer: sciruby
|
113
158
|
module: Minimization
|
159
|
+
owner: sciruby
|
114
160
|
version: "~> 0.2"
|
115
161
|
modshogun:
|
116
|
-
category:
|
162
|
+
category: ai
|
117
163
|
description: Machine learning
|
118
164
|
exclude: Not available as a gem
|
119
165
|
module: Modshogun
|
120
166
|
narray:
|
121
167
|
category: numerics
|
122
|
-
description:
|
168
|
+
description: Numerical matrix library
|
123
169
|
exclude: Conflicts with nmatrix
|
124
170
|
module: NArray
|
125
171
|
nmatrix:
|
126
172
|
category: numerics
|
127
|
-
description:
|
128
|
-
maintainer: sciruby
|
173
|
+
description: Numerical matrix library
|
129
174
|
module:
|
130
175
|
- N
|
131
176
|
- NMatrix
|
132
177
|
- NVector
|
178
|
+
owner: sciruby
|
133
179
|
version: "~> 0.1"
|
134
180
|
nyaplot:
|
135
181
|
category: plotting
|
@@ -141,6 +187,24 @@ ode:
|
|
141
187
|
description: Ordinary differential equations
|
142
188
|
exclude: Fortran dependencies
|
143
189
|
module: Ode
|
190
|
+
omoikane:
|
191
|
+
category: ai
|
192
|
+
description: Machine learning
|
193
|
+
module: Omoikane
|
194
|
+
version: "~> 0.0"
|
195
|
+
parallel:
|
196
|
+
category: utilties
|
197
|
+
description: Parallel processing
|
198
|
+
module: Parallel
|
199
|
+
version: "~> 1.6"
|
200
|
+
phys-units:
|
201
|
+
category: physics
|
202
|
+
description: Calculation with units
|
203
|
+
module:
|
204
|
+
- Phys::Unit
|
205
|
+
- Phys::Quantity
|
206
|
+
require: phys/units
|
207
|
+
version: "~> 0.9"
|
144
208
|
plotrb:
|
145
209
|
category: plotting
|
146
210
|
description: Plotting library
|
@@ -149,11 +213,11 @@ plotrb:
|
|
149
213
|
prime:
|
150
214
|
category: algebra
|
151
215
|
description: Stdlib prime module
|
152
|
-
maintainer: stdlib
|
153
216
|
module: Prime
|
217
|
+
owner: stdlib
|
154
218
|
pry:
|
155
|
-
category:
|
156
|
-
description: Ruby
|
219
|
+
category: ui
|
220
|
+
description: Ruby shell
|
157
221
|
module: Pry
|
158
222
|
version: "~> 0.10"
|
159
223
|
publisci:
|
@@ -168,11 +232,16 @@ rb-gsl:
|
|
168
232
|
module: GSL
|
169
233
|
require: gsl
|
170
234
|
rb-libsvm:
|
171
|
-
category:
|
235
|
+
category: ai
|
172
236
|
description: Support vector machines (machine learning)
|
173
237
|
module: Libsvm
|
174
238
|
require: libsvm
|
175
239
|
version: "~> 1.3"
|
240
|
+
rbmetis:
|
241
|
+
category: graph
|
242
|
+
description: Graph partitioning
|
243
|
+
exclude: Native dependencies
|
244
|
+
module: RbMetis
|
176
245
|
rinruby:
|
177
246
|
category: statistics
|
178
247
|
description: R interpreter
|
@@ -192,15 +261,16 @@ rsruby:
|
|
192
261
|
exclude: Native dependencies
|
193
262
|
module: RSRuby
|
194
263
|
ruby-band:
|
195
|
-
category:
|
264
|
+
category: ai
|
196
265
|
description: Data mining
|
197
266
|
exclude: Requires JRuby
|
198
267
|
ruby-dcl:
|
199
268
|
category: plotting
|
200
269
|
description: Plotting
|
201
270
|
exclude: Requires narray
|
271
|
+
module: NumRu::DCL
|
202
272
|
ruby-fann:
|
203
|
-
category:
|
273
|
+
category: ai
|
204
274
|
description: Neural networks
|
205
275
|
module: RubyFann
|
206
276
|
version: "~> 1.2"
|
@@ -219,8 +289,9 @@ ruby-netcdf:
|
|
219
289
|
category: data
|
220
290
|
description: Data file
|
221
291
|
exclude: Requires narray
|
292
|
+
module: NumRu::NetCDF
|
222
293
|
ruby-opencv:
|
223
|
-
category:
|
294
|
+
category: ai
|
224
295
|
description: Computer vision
|
225
296
|
exclude: Native dependencies
|
226
297
|
module: OpenCV
|
@@ -238,43 +309,51 @@ rubyvis:
|
|
238
309
|
sciruby:
|
239
310
|
category: meta
|
240
311
|
description: SciRuby meta gem
|
241
|
-
|
312
|
+
owner: sciruby
|
242
313
|
sciruby-full:
|
243
314
|
category: meta
|
244
315
|
description: SciRuby meta gem (Full installation)
|
245
|
-
|
246
|
-
sicom:
|
247
|
-
category: statistics
|
248
|
-
description: R interpreter
|
249
|
-
exclude: Requires JRuby
|
316
|
+
owner: sciruby
|
250
317
|
statsample:
|
251
318
|
category: statistics
|
252
319
|
description: Statistics
|
253
|
-
maintainer: sciruby
|
254
320
|
module: Statsample
|
321
|
+
owner: sciruby
|
255
322
|
version: "~> 1.4"
|
256
323
|
statsample-bivariate-extension:
|
257
324
|
category: statistics
|
258
|
-
description:
|
325
|
+
description: Statsample extension (Autoloaded)
|
259
326
|
version: "~> 1.1"
|
260
327
|
statsample-glm:
|
261
328
|
category: statistics
|
262
329
|
description: Statistics
|
263
|
-
|
330
|
+
module: Statsample::GLM
|
331
|
+
owner: sciruby
|
264
332
|
version: "~> 0.1"
|
265
333
|
statsample-optimization:
|
266
334
|
category: statistics
|
267
|
-
description:
|
335
|
+
description: Statsample extension (Autoloaded)
|
268
336
|
exclude: GSL conflict
|
337
|
+
statsample-sem:
|
338
|
+
category: statistics
|
339
|
+
description: Statistics
|
340
|
+
exclude: Outdated dependencies
|
341
|
+
module: Statsample::SEM
|
269
342
|
statsample-timeseries:
|
270
343
|
category: statistics
|
271
344
|
description: Statistics
|
272
345
|
exclude: activesupport version conflict
|
346
|
+
module: Statsample::Timeseries
|
273
347
|
stuff-classifier:
|
274
|
-
category:
|
348
|
+
category: ai
|
275
349
|
description: Machine learning
|
276
350
|
module: StuffClassifier
|
277
351
|
version: "~> 0.5"
|
352
|
+
treat:
|
353
|
+
category: linguistics
|
354
|
+
description: Natural language processing
|
355
|
+
exclude: birch doesn't compile with 2.2
|
356
|
+
module: Treat
|
278
357
|
unit:
|
279
358
|
category: physics
|
280
359
|
description: Calculation with units
|
data/lib/sciruby/autoload.rb
CHANGED
@@ -2,12 +2,16 @@ class Module
|
|
2
2
|
alias :const_missing_without_sciruby :const_missing
|
3
3
|
|
4
4
|
def const_missing(name)
|
5
|
-
|
6
|
-
|
7
|
-
paths.each {|path| require path }
|
8
|
-
const_get(name)
|
9
|
-
else
|
5
|
+
(Object != self && sciruby_autoload("#{self.name}::#{name}")) ||
|
6
|
+
sciruby_autoload(name) ||
|
10
7
|
const_missing_without_sciruby(name)
|
11
|
-
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def sciruby_autoload(name)
|
13
|
+
return unless paths = SciRuby.autoload_modules.delete(name.to_s)
|
14
|
+
paths.each {|path| require path }
|
15
|
+
const_get(name)
|
12
16
|
end
|
13
17
|
end
|
data/lib/sciruby/gems.rb
CHANGED
@@ -33,8 +33,14 @@ module SciRuby
|
|
33
33
|
gem = Hash[gem.map {|k,v| [k.to_sym, v] }]
|
34
34
|
gem[:name] = name
|
35
35
|
gem[:require] = [*(gem[:require] || name)]
|
36
|
-
gem[:module] = [*gem[:module]]
|
37
|
-
gem[:module].each
|
36
|
+
gem[:module] = [*gem[:module]]
|
37
|
+
gem[:module].each do |mod|
|
38
|
+
parts = mod.split('::')
|
39
|
+
parts.size.times do |i|
|
40
|
+
m = parts[0..i].join('::')
|
41
|
+
autoload_modules[m] = (i < parts.size - 1 && autoload_modules[m]) || gem[:require]
|
42
|
+
end
|
43
|
+
end
|
38
44
|
gems[name] = gem
|
39
45
|
end
|
40
46
|
end
|
data/lib/sciruby/version.rb
CHANGED
data/sciruby.gemspec
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
require File.expand_path(File.join(__FILE__, '..', 'scripts', 'helper.rb'))
|
2
2
|
|
3
|
-
SCIRUBY_FULL = false unless defined?(SCIRUBY_FULL)
|
4
|
-
|
5
3
|
Gem::Specification.new do |s|
|
6
|
-
s.name =
|
4
|
+
s.name = __FILE__.sub('.gemspec', '')
|
7
5
|
s.date = Date.today.to_s
|
8
6
|
s.version = SciRuby::VERSION
|
9
7
|
s.authors = ['SciRuby Development Team']
|
@@ -11,9 +9,9 @@ Gem::Specification.new do |s|
|
|
11
9
|
s.license = 'BSD'
|
12
10
|
s.homepage = 'http://sciruby.com'
|
13
11
|
s.summary =
|
14
|
-
s.description = "Scientific gems for Ruby#{
|
12
|
+
s.description = "Scientific gems for Ruby#{__FILE__ =~ /full/ ? ' (Full installation)' : ''}"
|
15
13
|
|
16
|
-
if
|
14
|
+
if __FILE__ =~ /full/
|
17
15
|
s.files = %w(CHANGES CONTRIBUTING.md README.md LICENSE sciruby-full.gemspec)
|
18
16
|
|
19
17
|
s.add_runtime_dependency 'sciruby', "= #{SciRuby::VERSION}"
|
data/scripts/deploy
CHANGED
data/scripts/gems.slim
CHANGED
@@ -5,53 +5,104 @@ html
|
|
5
5
|
title SciRuby gems
|
6
6
|
link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"
|
7
7
|
link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.css"
|
8
|
+
link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"
|
8
9
|
script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"
|
10
|
+
script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"
|
9
11
|
script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.8.1/bootstrap-table.min.js"
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
12
|
+
css:
|
13
|
+
td, th { white-space: nowrap; font-size: small; }
|
14
|
+
td .fa-diamond, .fa-close { color: #8B0000 }
|
15
|
+
td .fa-github { color: #000000 }
|
16
|
+
td .fa-book { color: #191970 }
|
17
|
+
td .fa-home, .fa-check { color: #006400 }
|
18
|
+
td .fa-warning { color: #FF8C00 }
|
19
|
+
h1 { margin-bottom: -1em; }
|
20
|
+
a { color: #8B0000 }
|
21
|
+
a:hover { color: #F00 }
|
22
|
+
tr.exclude { background: #F88 !important }
|
23
|
+
tr.warnings { background: #FF8 !important }
|
24
|
+
body: .container: .row: .col-md-12
|
25
|
+
h1
|
26
|
+
img width="50" src="http://upload.wikimedia.org/wikipedia/commons/7/73/Ruby_logo.svg"
|
27
|
+
a< href="http://sciruby.com" SciRuby gems
|
19
28
|
table.table data={ toggle: 'table',
|
20
29
|
search: 'true',
|
21
30
|
sortable: 'true',
|
22
31
|
show_toggle: 'true',
|
23
32
|
show_columns: 'true',
|
24
33
|
mobile_responsive: 'true',
|
25
|
-
striped: 'true'
|
34
|
+
striped: 'true',
|
35
|
+
height: 550 }
|
26
36
|
thead: tr
|
27
|
-
th data-sortable="true"
|
28
|
-
th data-sortable="true"
|
37
|
+
th data-sortable="true": span title="Status" S
|
38
|
+
th data-sortable="true": span.fa.fa-umbrella title="Owner"
|
39
|
+
th data-sortable="true": span.fa.fa-folder-open-o title="Category"
|
29
40
|
th data-sortable="true" Name
|
30
|
-
th data-sortable="true" Version
|
31
|
-
th data-sortable="true" Latest version
|
32
41
|
th data-sortable="true" Description
|
33
|
-
th
|
34
|
-
th data-sortable="true"
|
42
|
+
th: span.fa.fa-external-link title="Links"
|
43
|
+
th data-sortable="true": span title="Version constraint" C
|
44
|
+
th data-sortable="true": span title="Version" V
|
45
|
+
th data-sortable="true": span.fa.fa-calendar title="Release date"
|
46
|
+
th data-sortable="true" Autoload modules
|
47
|
+
th data-sortable="true": span.fa.fa-exclamation-circle title="Issues"
|
48
|
+
th data-sortable="true": span.fa.fa-star title="Stars"
|
49
|
+
th data-sortable="true": span.fa.fa-eye title="Watchers"
|
50
|
+
th data-sortable="true": span.fa.fa-code-fork title="Forks"
|
51
|
+
th data-sortable="true"
|
52
|
+
span.fa.fa-warning>
|
53
|
+
| Warnings
|
35
54
|
tbody
|
36
|
-
- Helper.
|
37
|
-
|
38
|
-
tr
|
55
|
+
- Helper.table_gems.each do |gem|
|
56
|
+
tr class=gem[:status]
|
39
57
|
td
|
40
|
-
- if gem[:
|
41
|
-
-
|
42
|
-
|
58
|
+
- if gem[:status] == 'exclude'
|
59
|
+
span.fa.fa-close title="Excluded from sciruby-full"
|
60
|
+
- elsif gem[:status] == 'ok'
|
61
|
+
span.fa.fa-check title="Ok, included in sciruby-full"
|
62
|
+
- else
|
63
|
+
span.fa.fa-warning title="#{gem[:warnings].size} warnings, included in sciruby-full"
|
64
|
+
td = gem[:owner]
|
43
65
|
td = gem[:category]
|
44
|
-
- if
|
45
|
-
td
|
46
|
-
a href=spec.homepage = gem[:name]
|
66
|
+
- if gem[:homepage]
|
67
|
+
td: a href=gem[:homepage] = gem[:name]
|
47
68
|
- else
|
48
69
|
td = gem[:name]
|
70
|
+
td = gem[:description]
|
71
|
+
td
|
72
|
+
- if gem[:homepage]
|
73
|
+
a<> href=gem[:homepage] : span.fa.fa-home
|
74
|
+
- if gem[:docs]
|
75
|
+
a<> href=gem[:docs] : span.fa.fa-book
|
76
|
+
- if gem[:spec]
|
77
|
+
a<> href="https://rubygems.org/gems/#{gem[:name]}": span.fa.fa-diamond
|
78
|
+
- if gem[:github]
|
79
|
+
a<> href="https://github.com/#{gem[:github]}": span.fa.fa-github
|
49
80
|
td = gem[:version]
|
50
81
|
td
|
51
|
-
- if spec
|
52
|
-
a href="https://rubygems.org/gems/#{gem[:name]}"
|
53
|
-
td = gem[:description]
|
54
|
-
td = gem[:module].join(', ')
|
82
|
+
- if gem[:spec]
|
83
|
+
a href="https://rubygems.org/gems/#{gem[:name]}" = gem[:spec].version
|
55
84
|
td
|
56
|
-
-
|
57
|
-
|
85
|
+
- if gem[:spec]
|
86
|
+
= gem[:date]
|
87
|
+
td == gem[:module].join(', ')
|
88
|
+
- if gem[:github]
|
89
|
+
td: a href="https://github.com/#{gem[:github]}/issues" = gem[:issues]
|
90
|
+
td: a href="https://github.com/#{gem[:github]}/stargazers" = gem[:stars]
|
91
|
+
td: a href="https://github.com/#{gem[:github]}/watchers" = gem[:watchers]
|
92
|
+
td: a href="https://github.com/#{gem[:github]}/network" = gem[:forks]
|
93
|
+
- else
|
94
|
+
td
|
95
|
+
td
|
96
|
+
td
|
97
|
+
td
|
98
|
+
td == gem[:warnings].join(', ')
|
99
|
+
.footer
|
100
|
+
' Last updated at #{Time.now.utc}
|
101
|
+
- if ENV['TRAVIS']
|
102
|
+
' by <a href="https://travis-ci.org/SciRuby/sciruby/jobs/#{ENV['TRAVIS_JOB_ID']}">Travis CI</a> from commit
|
103
|
+
<a href="https://github.com/SciRuby/sciruby/commit/#{ENV['TRAVIS_COMMIT']}">#{ENV['TRAVIS_COMMIT'].to_s[0,8]}</a>.
|
104
|
+
- else
|
105
|
+
' by #{`hostname -f`.chomp}.
|
106
|
+
| #{SciRuby.gems.size} gems registered in <a href="https://github.com/SciRuby/sciruby/blob/master/gems.yml">sciruby/gems.yml</a>,
|
107
|
+
#{SciRuby.gems.each_value.count {|gem| !gem[:exclude] }} included in <a href="https://rubygems.org/gems/sciruby-full">sciruby-full</a>,
|
108
|
+
#{SciRuby.gems.each_value.count {|gem| gem[:exclude] }} excluded.
|
data/scripts/helper.rb
CHANGED
@@ -43,7 +43,7 @@ module Helper
|
|
43
43
|
gem[:require].must_be_instance_of Array
|
44
44
|
gem[:require].empty?.must_equal false
|
45
45
|
|
46
|
-
if gem[:exclude] || gem[:
|
46
|
+
if gem[:exclude] || gem[:owner] == 'stdlib' || %w(sciruby sciruby-full).include?(gem[:name])
|
47
47
|
gem[:version].must_be_nil
|
48
48
|
else
|
49
49
|
gem[:version].must_be_instance_of String
|
@@ -52,32 +52,101 @@ module Helper
|
|
52
52
|
|
53
53
|
def fetch_spec(gem)
|
54
54
|
#STDERR.puts "Fetching #{gem[:name]}..."
|
55
|
-
|
55
|
+
dep = Gem::Dependency.new(gem[:name])
|
56
|
+
spec = Gem::SpecFetcher.fetcher.spec_for_dependency(dep, false).flatten[-2]
|
57
|
+
return spec if spec
|
58
|
+
dep.prerelease = true
|
59
|
+
Gem::SpecFetcher.fetcher.spec_for_dependency(dep, false).flatten[-2]
|
56
60
|
end
|
57
61
|
|
58
|
-
def
|
59
|
-
|
60
|
-
|
61
|
-
if spec
|
62
|
-
|
63
|
-
|
62
|
+
def gem_warnings(gem)
|
63
|
+
warnings = []
|
64
|
+
warnings << "Excluded: #{gem[:exclude]}" if gem[:exclude]
|
65
|
+
if gem[:spec]
|
66
|
+
warnings << "Last update #{gem[:date]}" if Time.now - gem[:spec].date > 2*365*24*3600
|
67
|
+
warnings << 'Outdated version constraint' if gem[:version] && !Gem::Dependency.new(gem[:name], *gem[:version]).matches_spec?(gem[:spec])
|
68
|
+
warnings << 'Github repository unknown' unless gem[:github]
|
64
69
|
else
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
|
70
|
+
warnings << 'Gem not found' unless gem[:exclude] || gem[:owner] == 'stdlib'
|
71
|
+
end
|
72
|
+
warnings << %{<a href="https://versioneye.com/ruby/#{gem[:name]}">Outdated dependencies</a>} if versioneye(gem[:name])
|
73
|
+
warnings
|
69
74
|
end
|
70
75
|
|
71
|
-
def
|
72
|
-
|
73
|
-
|
76
|
+
def table_gems
|
77
|
+
require 'parallel'
|
78
|
+
require 'net/http'
|
79
|
+
require 'json'
|
80
|
+
|
81
|
+
owner_order = {
|
82
|
+
'sciruby' => 0,
|
83
|
+
'stdlib' => 1
|
84
|
+
}
|
85
|
+
owner_order.default = 2
|
86
|
+
|
87
|
+
status_order = {
|
88
|
+
'ok' => 0,
|
89
|
+
'warnings' => 1,
|
90
|
+
'exclude' => 2
|
91
|
+
}
|
92
|
+
|
93
|
+
Parallel.map(SciRuby.gems.values, in_processes: 8) do |gem|
|
94
|
+
gem = gem.dup
|
95
|
+
|
96
|
+
if gem[:owner] == 'stdlib'
|
97
|
+
gem[:homepage] = gem[:docs] = "http://ruby-doc.org/stdlib/libdoc/#{gem[:name]}/rdoc/"
|
98
|
+
gem[:github] = "ruby/ruby/blob/trunk/lib/#{gem[:name]}.rb"
|
99
|
+
gem[:module] = gem[:module].map {|mod| %{<a href="#{gem[:docs]}#{mod.gsub('::', '/')}.html">#{mod}</a>} }
|
100
|
+
elsif spec = fetch_spec(gem)
|
101
|
+
gem[:spec] = spec
|
102
|
+
gem[:date] = spec.date.strftime('%Y-%m-%d')
|
103
|
+
gem[:homepage] = spec.homepage
|
104
|
+
gem[:docs] = "http://www.rubydoc.info/gems/#{gem[:name]}/#{spec.version}"
|
105
|
+
gem[:module] = gem[:module].map {|mod| %{<a href="#{gem[:docs]}/#{mod.gsub('::', '/')}">#{mod}</a>} }
|
106
|
+
github_infos(gem)
|
107
|
+
end
|
108
|
+
gem[:warnings] = gem_warnings(gem)
|
109
|
+
|
110
|
+
if gem[:exclude]
|
111
|
+
gem[:status] = 'exclude'
|
112
|
+
elsif gem[:warnings].empty?
|
113
|
+
gem[:status] = 'ok'
|
114
|
+
else
|
115
|
+
gem[:status] = 'warnings'
|
116
|
+
end
|
117
|
+
|
118
|
+
gem
|
119
|
+
end.stable_sort_by {|gem| gem[:name] }.
|
74
120
|
stable_sort_by {|gem| gem[:category] }.
|
75
|
-
stable_sort_by {|gem|
|
121
|
+
stable_sort_by {|gem| owner_order[gem[:owner]] }.
|
122
|
+
stable_sort_by {|gem| status_order[gem[:status]] }
|
123
|
+
end
|
124
|
+
|
125
|
+
def github_infos(gem)
|
126
|
+
if gem[:github] = github_name(gem)
|
127
|
+
data = JSON.parse(Net::HTTP.get(URI("https://api.github.com/repos/#{gem[:github]}?client_id=#{ENV['CLIENT_ID']}&client_secret=#{ENV['CLIENT_SECRET']}")))
|
128
|
+
gem[:issues] = data['open_issues_count']
|
129
|
+
gem[:forks] = data['forks_count']
|
130
|
+
gem[:stars] = data['stargazers_count']
|
131
|
+
gem[:watchers] = data['subscribers_count']
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
def github_name(gem)
|
136
|
+
return $1 if gem[:spec].homepage =~ %r{github.com/([^/]+/[^/]+)}
|
137
|
+
JSON.parse(Net::HTTP.get(URI("https://rubygems.org/api/v1/gems/#{gem[:name]}.json"))).each do |k,v|
|
138
|
+
return $1 if k =~ /_uri/ && v =~ %r{github.com/([^/]+/[^/]+)}
|
139
|
+
end
|
140
|
+
nil
|
141
|
+
end
|
142
|
+
|
143
|
+
def versioneye(name)
|
144
|
+
Net::HTTP.get(URI("https://www.versioneye.com/ruby/#{name}/badge")) =~ /out of date/
|
76
145
|
end
|
77
146
|
|
78
147
|
def sciruby_gems(exclude)
|
79
148
|
SciRuby.gems.each_value.sort_by {|gem| gem[:name] }.reject do |gem|
|
80
|
-
gem[:
|
149
|
+
gem[:owner] == 'stdlib' || %w(sciruby sciruby-full).include?(gem[:name])
|
81
150
|
end.reject {|gem| gem[:exclude] && exclude }
|
82
151
|
end
|
83
152
|
end
|
data/scripts/test
CHANGED
@@ -20,7 +20,7 @@ describe 'gems.yml' do
|
|
20
20
|
|
21
21
|
it 'contains no gratuitous keys' do
|
22
22
|
YAML.load_file(SciRuby::GEMS_YML).each do |name, gem|
|
23
|
-
gem.each_key {|k| %w(category
|
23
|
+
gem.each_key {|k| %w(category owner description exclude version module require).include?(k).must_equal true }
|
24
24
|
gem['require'].wont_equal name if gem['require']
|
25
25
|
end
|
26
26
|
end
|
@@ -46,32 +46,37 @@ describe SciRuby do
|
|
46
46
|
|
47
47
|
it 'provides list of modules' do
|
48
48
|
SciRuby.modules.must_be_instance_of Array
|
49
|
-
SciRuby.modules.each {|m| m.must_be_instance_of
|
49
|
+
SciRuby.modules.each {|m| m.must_be_instance_of String }
|
50
50
|
end
|
51
51
|
|
52
52
|
it 'provides list of installed modules' do
|
53
53
|
SciRuby.installed_modules.must_be_instance_of Array
|
54
|
-
SciRuby.installed_modules.each {|m| m.must_be_instance_of
|
54
|
+
SciRuby.installed_modules.each {|m| m.must_be_instance_of String }
|
55
55
|
end
|
56
56
|
|
57
57
|
it 'provides list of autoloadable modules' do
|
58
58
|
SciRuby.autoload_modules.must_be_instance_of Hash
|
59
|
-
SciRuby.autoload_modules.each_key {|k| k.must_be_instance_of
|
59
|
+
SciRuby.autoload_modules.each_key {|k| k.must_be_instance_of String }
|
60
60
|
SciRuby.autoload_modules.each_value {|v| v.must_be_instance_of Array }
|
61
61
|
end
|
62
62
|
|
63
|
+
it 'has unique modules' do
|
64
|
+
mods = SciRuby.gems.each_value.map {|gem| gem[:module] }.flatten
|
65
|
+
mods.uniq.must_equal mods
|
66
|
+
end
|
67
|
+
|
63
68
|
it 'autoloads modules' do
|
64
|
-
SciRuby.autoload_modules.must_include
|
69
|
+
SciRuby.autoload_modules.must_include 'Prime'
|
65
70
|
|
66
|
-
Object.const_defined?(
|
71
|
+
Object.const_defined?('Prime').must_equal false
|
67
72
|
Prime.must_be_instance_of Class
|
68
|
-
Object.const_defined?(
|
73
|
+
Object.const_defined?('Prime').must_equal true
|
69
74
|
|
70
|
-
SciRuby.autoload_modules.wont_include
|
75
|
+
SciRuby.autoload_modules.wont_include 'Prime'
|
71
76
|
|
72
77
|
SciRuby.installed_gems.each_value.map {|gem| gem[:module] }.flatten.each do |mod|
|
73
|
-
next if mod ==
|
74
|
-
|
78
|
+
next if mod == 'R' || mod == 'RinRuby' # FIXME, don't test RinRuby for now since it requires an installaion of R
|
79
|
+
eval(mod).wont_equal nil
|
75
80
|
end
|
76
81
|
end
|
77
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sciruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SciRuby Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Scientific gems for Ruby
|
14
14
|
email:
|
@@ -44,6 +44,8 @@ post_install_message: |+
|
|
44
44
|
* ai4r - Artificial intelligence
|
45
45
|
* algorithms - Algorithms and data structures
|
46
46
|
* awesome_print - Pretty object printing
|
47
|
+
* bibsync - Bibliography synchronization
|
48
|
+
* bibtex-ruby - BibTeX parser
|
47
49
|
* bio - Bioinformatics suite
|
48
50
|
* cassowary - Incremental constraint solver
|
49
51
|
* classifier - Machine learning
|
@@ -55,22 +57,32 @@ post_install_message: |+
|
|
55
57
|
* gga4r - Generic algorithms
|
56
58
|
* gimuby - Genetic algorithms
|
57
59
|
* gnuplot - Plotting library
|
60
|
+
* gruff - Plotting library
|
61
|
+
* histogram - Histogram method
|
58
62
|
* integration - Numerical integration
|
59
63
|
* irtruby - Machine learning
|
60
64
|
* iruby - Ruby kernel for Jupyter
|
65
|
+
* liblinear-ruby - Linear classifier
|
61
66
|
* lpsolve - Linear solver
|
62
67
|
* mathgl - Plotting library
|
68
|
+
* mdarray - Numerical matrix library
|
69
|
+
* measurable - Distance measures for machine learning
|
70
|
+
* mikon - Dataframe library
|
63
71
|
* minimization - Numerical minimization
|
64
72
|
* modshogun - Machine learning
|
65
|
-
* narray -
|
66
|
-
* nmatrix -
|
73
|
+
* narray - Numerical matrix library
|
74
|
+
* nmatrix - Numerical matrix library
|
67
75
|
* nyaplot - Plotting library
|
68
76
|
* ode - Ordinary differential equations
|
77
|
+
* omoikane - Machine learning
|
78
|
+
* parallel - Parallel processing
|
79
|
+
* phys-units - Calculation with units
|
69
80
|
* plotrb - Plotting library
|
70
|
-
* pry - Ruby
|
81
|
+
* pry - Ruby shell
|
71
82
|
* publisci - Publishing toolkit
|
72
83
|
* rb-gsl - Bindings for the GNU scientific library
|
73
84
|
* rb-libsvm - Support vector machines (machine learning)
|
85
|
+
* rbmetis - Graph partitioning
|
74
86
|
* rinruby - R interpreter
|
75
87
|
* rserve-client - R interpreter
|
76
88
|
* rsruby - R interpreter
|
@@ -83,13 +95,14 @@ post_install_message: |+
|
|
83
95
|
* ruby-opencv - Computer vision
|
84
96
|
* ruby-pgplot - Plotting
|
85
97
|
* rubyvis - Plotting library
|
86
|
-
* sicom - R interpreter
|
87
98
|
* statsample - Statistics
|
88
|
-
* statsample-bivariate-extension -
|
99
|
+
* statsample-bivariate-extension - Statsample extension (Autoloaded)
|
89
100
|
* statsample-glm - Statistics
|
90
|
-
* statsample-optimization -
|
101
|
+
* statsample-optimization - Statsample extension (Autoloaded)
|
102
|
+
* statsample-sem - Statistics
|
91
103
|
* statsample-timeseries - Statistics
|
92
104
|
* stuff-classifier - Machine learning
|
105
|
+
* treat - Natural language processing
|
93
106
|
* unit - Calculation with units
|
94
107
|
|
95
108
|
rdoc_options: []
|