lab_tech 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/README.md +9 -0
- data/app/models/lab_tech/experiment.rb +5 -1
- data/app/models/lab_tech/result.rb +7 -5
- data/db/migrate/20210205225332_add_observation_diff.rb +6 -0
- data/lib/lab_tech/version.rb +1 -1
- data/spec/dummy/db/schema.rb +2 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +171 -0
- data/spec/dummy/log/test.log +9505 -0
- data/spec/examples.txt +81 -79
- data/spec/models/lab_tech/experiment_spec.rb +33 -1
- metadata +3 -2
data/spec/examples.txt
CHANGED
@@ -1,81 +1,83 @@
|
|
1
1
|
example_id | status | run_time |
|
2
2
|
---------------------------------------------------- | ------ | --------------- |
|
3
|
-
./spec/models/lab_tech/default_cleaner_spec.rb[1:1] | passed | 0.
|
4
|
-
./spec/models/lab_tech/default_cleaner_spec.rb[1:2] | passed | 0.
|
5
|
-
./spec/models/lab_tech/default_cleaner_spec.rb[1:3] | passed | 0.
|
6
|
-
./spec/models/lab_tech/default_cleaner_spec.rb[1:4] | passed | 0.
|
7
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:1:1] | passed | 0.
|
8
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:1] | passed | 0.
|
9
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:2] | passed | 0.
|
10
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:1] | passed | 0.
|
11
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:2] | passed | 0.
|
12
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:4:1] | passed | 0.
|
13
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:
|
14
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:5:
|
15
|
-
./spec/models/lab_tech/
|
16
|
-
./spec/models/lab_tech/
|
17
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
18
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
19
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
20
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
21
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
22
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
23
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
24
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
25
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:
|
26
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:
|
27
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:2:
|
28
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:2:
|
29
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:3
|
30
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:
|
31
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:3:
|
32
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:3:
|
33
|
-
./spec/models/lab_tech/percentile_spec.rb[1:
|
34
|
-
./spec/models/lab_tech/percentile_spec.rb[1:
|
35
|
-
./spec/models/lab_tech/percentile_spec.rb[1:2:
|
36
|
-
./spec/models/lab_tech/percentile_spec.rb[1:2:
|
37
|
-
./spec/models/lab_tech/percentile_spec.rb[1:2:
|
38
|
-
./spec/models/lab_tech/percentile_spec.rb[1:
|
39
|
-
./spec/models/lab_tech/percentile_spec.rb[1:
|
40
|
-
./spec/models/lab_tech/percentile_spec.rb[1:3:
|
41
|
-
./spec/models/lab_tech/percentile_spec.rb[1:3:
|
42
|
-
./spec/models/lab_tech/percentile_spec.rb[1:3:
|
43
|
-
./spec/models/lab_tech/
|
44
|
-
./spec/models/lab_tech/
|
45
|
-
./spec/models/lab_tech/result_spec.rb[1:1:
|
46
|
-
./spec/models/lab_tech/result_spec.rb[1:1:2:
|
47
|
-
./spec/models/lab_tech/result_spec.rb[1:1:2:
|
48
|
-
./spec/models/lab_tech/result_spec.rb[1:1:2:
|
49
|
-
./spec/models/lab_tech/result_spec.rb[1:1:3:
|
50
|
-
./spec/models/lab_tech/result_spec.rb[1:1:4:1]
|
51
|
-
./spec/models/lab_tech/result_spec.rb[1:1:
|
52
|
-
./spec/models/lab_tech/result_spec.rb[1:1:
|
53
|
-
./spec/models/lab_tech/
|
54
|
-
./spec/models/lab_tech/
|
55
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
56
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
57
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
58
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
59
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
60
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
61
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
62
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
63
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
64
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
65
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
66
|
-
./spec/models/lab_tech/
|
67
|
-
./spec/models/lab_tech/
|
68
|
-
./spec/models/lab_tech/summary_spec.rb[1:
|
69
|
-
./spec/models/lab_tech/summary_spec.rb[1:
|
70
|
-
./spec/models/lab_tech/summary_spec.rb[1:
|
71
|
-
./spec/models/lab_tech/summary_spec.rb[1:
|
72
|
-
./spec/models/lab_tech/summary_spec.rb[1:
|
73
|
-
./spec/models/lab_tech/summary_spec.rb[1:
|
74
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
75
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
76
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
77
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
78
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:4:
|
79
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
80
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
81
|
-
./spec/models/
|
3
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:1] | passed | 0.00035 seconds |
|
4
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:2] | passed | 0.00158 seconds |
|
5
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:3] | passed | 0.0004 seconds |
|
6
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:4] | passed | 0.00198 seconds |
|
7
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:1:1] | passed | 0.00245 seconds |
|
8
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:1] | passed | 0.04398 seconds |
|
9
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:2] | passed | 0.03791 seconds |
|
10
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:1] | passed | 0.01052 seconds |
|
11
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:2] | passed | 0.0102 seconds |
|
12
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:4:1] | passed | 0.00988 seconds |
|
13
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:4:2] | passed | 0.01138 seconds |
|
14
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:5:1] | passed | 0.00849 seconds |
|
15
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:6:1] | passed | 0.0257 seconds |
|
16
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:6:2] | passed | 0.02477 seconds |
|
17
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:1] | passed | 0.00032 seconds |
|
18
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:2] | passed | 0.00032 seconds |
|
19
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:3] | passed | 0.00032 seconds |
|
20
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:4] | passed | 0.00037 seconds |
|
21
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:5] | passed | 0.00032 seconds |
|
22
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:6] | passed | 0.00033 seconds |
|
23
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:7] | passed | 0.00032 seconds |
|
24
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:8] | passed | 0.00034 seconds |
|
25
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:9] | passed | 0.00033 seconds |
|
26
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:10] | passed | 0.00033 seconds |
|
27
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:1] | passed | 0.00033 seconds |
|
28
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:2] | passed | 0.00038 seconds |
|
29
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:3] | passed | 0.00035 seconds |
|
30
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:4] | passed | 0.00033 seconds |
|
31
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:1] | passed | 0.00036 seconds |
|
32
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:2] | passed | 0.00032 seconds |
|
33
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:3] | passed | 0.00032 seconds |
|
34
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:4] | passed | 0.00032 seconds |
|
35
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:1] | passed | 0.00033 seconds |
|
36
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:2] | passed | 0.00045 seconds |
|
37
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:3] | passed | 0.00034 seconds |
|
38
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:4] | passed | 0.00033 seconds |
|
39
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:5] | passed | 0.00036 seconds |
|
40
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:1] | passed | 0.00042 seconds |
|
41
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:2] | passed | 0.00042 seconds |
|
42
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:3] | passed | 0.00043 seconds |
|
43
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:4] | passed | 0.00045 seconds |
|
44
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:5] | passed | 0.0005 seconds |
|
45
|
+
./spec/models/lab_tech/result_spec.rb[1:1:1] | passed | 0.01439 seconds |
|
46
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:1:1] | passed | 0.01034 seconds |
|
47
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:2:1] | passed | 0.00937 seconds |
|
48
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:3:1] | passed | 0.00928 seconds |
|
49
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:3:2] | passed | 0.00961 seconds |
|
50
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:4:1] | passed | 0.02164 seconds |
|
51
|
+
./spec/models/lab_tech/result_spec.rb[1:1:3:1] | passed | 0.01739 seconds |
|
52
|
+
./spec/models/lab_tech/result_spec.rb[1:1:4:1] | passed | 0.01178 seconds |
|
53
|
+
./spec/models/lab_tech/result_spec.rb[1:1:5:1] | passed | 0.01725 seconds |
|
54
|
+
./spec/models/lab_tech/result_spec.rb[1:1:6] | passed | 0.01156 seconds |
|
55
|
+
./spec/models/lab_tech/speedup_spec.rb[1:1] | passed | 0.00192 seconds |
|
56
|
+
./spec/models/lab_tech/speedup_spec.rb[1:2] | passed | 0.00043 seconds |
|
57
|
+
./spec/models/lab_tech/speedup_spec.rb[1:3] | passed | 0.00046 seconds |
|
58
|
+
./spec/models/lab_tech/speedup_spec.rb[1:4] | passed | 0.0004 seconds |
|
59
|
+
./spec/models/lab_tech/speedup_spec.rb[1:5] | passed | 0.00054 seconds |
|
60
|
+
./spec/models/lab_tech/speedup_spec.rb[1:6] | passed | 0.00053 seconds |
|
61
|
+
./spec/models/lab_tech/speedup_spec.rb[1:7] | passed | 0.00074 seconds |
|
62
|
+
./spec/models/lab_tech/speedup_spec.rb[1:8] | passed | 0.00042 seconds |
|
63
|
+
./spec/models/lab_tech/speedup_spec.rb[1:9] | passed | 0.00068 seconds |
|
64
|
+
./spec/models/lab_tech/speedup_spec.rb[1:10] | passed | 0.00057 seconds |
|
65
|
+
./spec/models/lab_tech/speedup_spec.rb[1:11] | passed | 0.00047 seconds |
|
66
|
+
./spec/models/lab_tech/speedup_spec.rb[1:12] | passed | 0.00058 seconds |
|
67
|
+
./spec/models/lab_tech/speedup_spec.rb[1:13] | passed | 0.00056 seconds |
|
68
|
+
./spec/models/lab_tech/summary_spec.rb[1:1:1] | passed | 0.00452 seconds |
|
69
|
+
./spec/models/lab_tech/summary_spec.rb[1:2:1] | passed | 0.0245 seconds |
|
70
|
+
./spec/models/lab_tech/summary_spec.rb[1:3:1] | passed | 0.0205 seconds |
|
71
|
+
./spec/models/lab_tech/summary_spec.rb[1:4:1] | passed | 0.01767 seconds |
|
72
|
+
./spec/models/lab_tech/summary_spec.rb[1:5:1] | passed | 0.01795 seconds |
|
73
|
+
./spec/models/lab_tech/summary_spec.rb[1:5:2] | passed | 0.01774 seconds |
|
74
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:1:1] | passed | 0.01794 seconds |
|
75
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:1:2] | passed | 0.01742 seconds |
|
76
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:2:1] | passed | 0.02218 seconds |
|
77
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:3:1] | passed | 0.02999 seconds |
|
78
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:4:1] | passed | 0.0679 seconds |
|
79
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:4:2] | passed | 0.05004 seconds |
|
80
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:4:3] | passed | 0.04788 seconds |
|
81
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:5:1] | passed | 0.07049 seconds |
|
82
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:6:1] | passed | 0.2158 seconds |
|
83
|
+
./spec/models/lab_tech_spec.rb[1:1:1] | passed | 0.00087 seconds |
|
@@ -49,7 +49,9 @@ RSpec.describe LabTech::Experiment do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
it "records the results when the experiment is run" do
|
52
|
-
expect( LabTech::Result ).to
|
52
|
+
expect( LabTech::Result ).to \
|
53
|
+
receive( :record_a_science ) \
|
54
|
+
.with( experiment, instance_of(Scientist::Result), anything )
|
53
55
|
|
54
56
|
LabTech.science "wibble" do |e|
|
55
57
|
e.use { :wibble }
|
@@ -90,6 +92,36 @@ RSpec.describe LabTech::Experiment do
|
|
90
92
|
end
|
91
93
|
end
|
92
94
|
|
95
|
+
describe "diff-generating behavior" do
|
96
|
+
let(:result) { experiment.results.first }
|
97
|
+
|
98
|
+
specify "if a #diff block IS provided, it is used" do
|
99
|
+
LabTech.science "wibble" do |e|
|
100
|
+
e.use { :control }
|
101
|
+
e.try { :candidate }
|
102
|
+
|
103
|
+
e.diff { |control, candidate| "this is a diff" }
|
104
|
+
end
|
105
|
+
|
106
|
+
result = experiment.results.first
|
107
|
+
expect( result ).to be_kind_of( LabTech::Result )
|
108
|
+
|
109
|
+
expect( result.control .diff ).to be_blank # because it's the reference against which candidates are diffed
|
110
|
+
expect( result.candidates.first .diff ).to eq( "this is a diff" )
|
111
|
+
end
|
112
|
+
|
113
|
+
specify "if a #diff block IS NOT provided, nothing untoward occurs" do
|
114
|
+
LabTech.science "wibble" do |e|
|
115
|
+
e.use { :control }
|
116
|
+
e.try { :candidate }
|
117
|
+
end
|
118
|
+
|
119
|
+
result = experiment.results.first
|
120
|
+
expect( result.control .diff ).to be_blank # because it's the reference against which candidates are diffed
|
121
|
+
expect( result.candidates.first .diff ).to be_blank # because no block was provided
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
93
125
|
describe "result counts" do
|
94
126
|
specify "when results are equivalent" do
|
95
127
|
LabTech.science "wibble" do |e|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lab_tech
|
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
|
- Sam Livingston-Gray
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- app/models/lab_tech/summary/speedup_line.rb
|
124
124
|
- config/routes.rb
|
125
125
|
- db/migrate/20190815192130_create_experiment_tables.rb
|
126
|
+
- db/migrate/20210205225332_add_observation_diff.rb
|
126
127
|
- lib/lab_tech.rb
|
127
128
|
- lib/lab_tech/engine.rb
|
128
129
|
- lib/lab_tech/version.rb
|