miga-base 0.7.8.0 → 0.7.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/stats.rb +1 -1
- data/lib/miga/cli/action/summary.rb +6 -1
- data/lib/miga/common/format.rb +4 -2
- data/lib/miga/version.rb +2 -2
- 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: d699b0ec0f4b7097439d64083fec6f3187662f9bcfa5d9921aebb27cdfd1c263
|
4
|
+
data.tar.gz: 7ebffb85482969f3304e643a638fdc6f45439da8d2f11d9b8cffe27713c6e286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6517ec344ff45a1ec79db56250ad0c15423b6eac0bf4cad07def7e17dde238c3c7064a70df9f50a2411ec3b2dae27756483ba92c192553cf8fdcc9104acf730
|
7
|
+
data.tar.gz: 8858ed1fed6861deff6137950c42c6f8a872c9406dc6ef3969676642f3c945de21395c4c5975e6885ede2059f9ea9c11620ec3c764774dc0f5deeb9ac058bb7f
|
@@ -26,6 +26,10 @@ class MiGA::Cli::Action::Summary < MiGA::Cli::Action
|
|
26
26
|
'--with-units',
|
27
27
|
'Include units in each cell'
|
28
28
|
) { |v| cli[:units] = v }
|
29
|
+
opt.on(
|
30
|
+
'--compute-and-save',
|
31
|
+
'Compute and save the statistics if not yet available'
|
32
|
+
) { |v| cli[:compute] = v }
|
29
33
|
end
|
30
34
|
end
|
31
35
|
|
@@ -34,7 +38,8 @@ class MiGA::Cli::Action::Summary < MiGA::Cli::Action
|
|
34
38
|
ds = cli.load_and_filter_datasets
|
35
39
|
cli.say 'Loading results'
|
36
40
|
stats = ds.map do |d|
|
37
|
-
r = d.
|
41
|
+
r = d.result(cli[:result])
|
42
|
+
r.compute_stats if cli[:compute] && !r.nil? && r[:stats].empty?
|
38
43
|
s = r.nil? ? {} : r[:stats]
|
39
44
|
s.tap { |i| i[:dataset] = d.name }
|
40
45
|
end
|
data/lib/miga/common/format.rb
CHANGED
@@ -90,7 +90,8 @@ module MiGA::Common::Format
|
|
90
90
|
end
|
91
91
|
fh.close
|
92
92
|
|
93
|
-
o = { n: l.size, tot: l.inject(:+), max: l.max }
|
93
|
+
o = { n: l.size, tot: l.inject(0, :+), max: l.max }
|
94
|
+
return o if o[:tot].zero?
|
94
95
|
o[:avg] = o[:tot].to_f / l.size
|
95
96
|
o[:var] = l.map { |a| a**2 }.inject(:+).to_f / l.size - o[:avg]**2
|
96
97
|
o[:sd] = Math.sqrt o[:var]
|
@@ -106,7 +107,8 @@ module MiGA::Common::Format
|
|
106
107
|
break if pos >= thr
|
107
108
|
end
|
108
109
|
o[:med] = o[:n].even? ?
|
109
|
-
0.5 * l[o[:n] / 2 - 1, 2].inject(:+) :
|
110
|
+
0.5 * l[o[:n] / 2 - 1, 2].inject(:+) :
|
111
|
+
l[(o[:n] - 1) / 2]
|
110
112
|
end
|
111
113
|
o
|
112
114
|
end
|
data/lib/miga/version.rb
CHANGED
@@ -8,7 +8,7 @@ module MiGA
|
|
8
8
|
# - Float representing the major.minor version.
|
9
9
|
# - Integer representing gem releases of the current version.
|
10
10
|
# - Integer representing minor changes that require new version number.
|
11
|
-
VERSION = [0.7,
|
11
|
+
VERSION = [0.7, 9, 0]
|
12
12
|
|
13
13
|
##
|
14
14
|
# Nickname for the current major.minor version.
|
@@ -16,7 +16,7 @@ module MiGA
|
|
16
16
|
|
17
17
|
##
|
18
18
|
# Date of the current gem release.
|
19
|
-
VERSION_DATE = Date.new(2020, 6,
|
19
|
+
VERSION_DATE = Date.new(2020, 6, 8)
|
20
20
|
|
21
21
|
##
|
22
22
|
# Reference of MiGA.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miga-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis M. Rodriguez-R
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|