lab_tech 0.1.5 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/lab_tech/experiment.rb +9 -1
- data/app/models/lab_tech/result.rb +16 -5
- data/lib/lab_tech/version.rb +1 -1
- data/spec/dummy/config/environments/test.rb +19 -6
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +593 -0
- data/spec/dummy/log/test.log +27337 -0
- data/spec/examples.txt +82 -81
- data/spec/models/lab_tech/experiment_spec.rb +21 -1
- metadata +4 -4
data/spec/examples.txt
CHANGED
@@ -1,83 +1,84 @@
|
|
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
|
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/experiment_spec.rb[1:1:2:6:1] | passed | 0.
|
16
|
-
./spec/models/lab_tech/experiment_spec.rb[1:1:2:
|
17
|
-
./spec/models/lab_tech/
|
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:1:
|
26
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:1:
|
27
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:
|
28
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:2:
|
29
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:2:
|
30
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:2:
|
31
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:
|
32
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:3:
|
33
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:3:
|
34
|
-
./spec/models/lab_tech/percentile_spec.rb[1:1:3:
|
35
|
-
./spec/models/lab_tech/percentile_spec.rb[1:
|
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:2:
|
39
|
-
./spec/models/lab_tech/percentile_spec.rb[1:2:
|
40
|
-
./spec/models/lab_tech/percentile_spec.rb[1:
|
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/percentile_spec.rb[1:3:
|
44
|
-
./spec/models/lab_tech/percentile_spec.rb[1:3:
|
45
|
-
./spec/models/lab_tech/
|
46
|
-
./spec/models/lab_tech/result_spec.rb[1:1:
|
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:2:3:
|
50
|
-
./spec/models/lab_tech/result_spec.rb[1:1:2:
|
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/result_spec.rb[1:1:
|
54
|
-
./spec/models/lab_tech/result_spec.rb[1:1:
|
55
|
-
./spec/models/lab_tech/
|
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/speedup_spec.rb[1:
|
67
|
-
./spec/models/lab_tech/speedup_spec.rb[1:
|
68
|
-
./spec/models/lab_tech/
|
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:5:
|
74
|
-
./spec/models/lab_tech/summary_spec.rb[1:
|
75
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:1:
|
76
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:2
|
77
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
78
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
79
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:4:
|
80
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:4:
|
81
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
82
|
-
./spec/models/lab_tech/summary_spec.rb[1:6:
|
83
|
-
./spec/models/
|
3
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:1] | passed | 0.00087 seconds |
|
4
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:2] | passed | 0.00376 seconds |
|
5
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:3] | passed | 0.00071 seconds |
|
6
|
+
./spec/models/lab_tech/default_cleaner_spec.rb[1:4] | passed | 0.00564 seconds |
|
7
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:1:1] | passed | 0.00585 seconds |
|
8
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:1] | passed | 0.01204 seconds |
|
9
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:2] | passed | 0.02016 seconds |
|
10
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:1] | passed | 0.02198 seconds |
|
11
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:2] | passed | 0.02184 seconds |
|
12
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:4] | passed | 0.01873 seconds |
|
13
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:5:1] | passed | 0.01748 seconds |
|
14
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:5:2] | passed | 0.01229 seconds |
|
15
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:6:1] | passed | 0.01966 seconds |
|
16
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:7:1] | passed | 0.04063 seconds |
|
17
|
+
./spec/models/lab_tech/experiment_spec.rb[1:1:2:7:2] | passed | 0.0512 seconds |
|
18
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:1] | passed | 0.00062 seconds |
|
19
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:2] | passed | 0.00065 seconds |
|
20
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:3] | passed | 0.00074 seconds |
|
21
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:4] | passed | 0.00081 seconds |
|
22
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:5] | passed | 0.00101 seconds |
|
23
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:6] | passed | 0.00053 seconds |
|
24
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:7] | passed | 0.00061 seconds |
|
25
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:8] | passed | 0.00079 seconds |
|
26
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:9] | passed | 0.00066 seconds |
|
27
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:1:10] | passed | 0.00116 seconds |
|
28
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:1] | passed | 0.00066 seconds |
|
29
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:2] | passed | 0.00107 seconds |
|
30
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:3] | passed | 0.00078 seconds |
|
31
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:2:4] | passed | 0.00112 seconds |
|
32
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:1] | passed | 0.00056 seconds |
|
33
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:2] | passed | 0.00059 seconds |
|
34
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:3] | passed | 0.00058 seconds |
|
35
|
+
./spec/models/lab_tech/percentile_spec.rb[1:1:3:4] | passed | 0.00075 seconds |
|
36
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:1] | passed | 0.00047 seconds |
|
37
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:2] | passed | 0.00043 seconds |
|
38
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:3] | passed | 0.00061 seconds |
|
39
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:4] | passed | 0.0009 seconds |
|
40
|
+
./spec/models/lab_tech/percentile_spec.rb[1:2:5] | passed | 0.00064 seconds |
|
41
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:1] | passed | 0.00055 seconds |
|
42
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:2] | passed | 0.00065 seconds |
|
43
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:3] | passed | 0.00054 seconds |
|
44
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:4] | passed | 0.00055 seconds |
|
45
|
+
./spec/models/lab_tech/percentile_spec.rb[1:3:5] | passed | 0.00054 seconds |
|
46
|
+
./spec/models/lab_tech/result_spec.rb[1:1:1] | passed | 0.1018 seconds |
|
47
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:1:1] | passed | 0.01485 seconds |
|
48
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:2:1] | passed | 0.01513 seconds |
|
49
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:3:1] | passed | 0.02193 seconds |
|
50
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:3:2] | passed | 0.01111 seconds |
|
51
|
+
./spec/models/lab_tech/result_spec.rb[1:1:2:4:1] | passed | 0.0194 seconds |
|
52
|
+
./spec/models/lab_tech/result_spec.rb[1:1:3:1] | passed | 0.00726 seconds |
|
53
|
+
./spec/models/lab_tech/result_spec.rb[1:1:4:1] | passed | 0.02977 seconds |
|
54
|
+
./spec/models/lab_tech/result_spec.rb[1:1:5:1] | passed | 0.01312 seconds |
|
55
|
+
./spec/models/lab_tech/result_spec.rb[1:1:6] | passed | 0.02705 seconds |
|
56
|
+
./spec/models/lab_tech/speedup_spec.rb[1:1] | passed | 0.00057 seconds |
|
57
|
+
./spec/models/lab_tech/speedup_spec.rb[1:2] | passed | 0.00194 seconds |
|
58
|
+
./spec/models/lab_tech/speedup_spec.rb[1:3] | passed | 0.00069 seconds |
|
59
|
+
./spec/models/lab_tech/speedup_spec.rb[1:4] | passed | 0.00059 seconds |
|
60
|
+
./spec/models/lab_tech/speedup_spec.rb[1:5] | passed | 0.0006 seconds |
|
61
|
+
./spec/models/lab_tech/speedup_spec.rb[1:6] | passed | 0.00149 seconds |
|
62
|
+
./spec/models/lab_tech/speedup_spec.rb[1:7] | passed | 0.00052 seconds |
|
63
|
+
./spec/models/lab_tech/speedup_spec.rb[1:8] | passed | 0.00051 seconds |
|
64
|
+
./spec/models/lab_tech/speedup_spec.rb[1:9] | passed | 0.00105 seconds |
|
65
|
+
./spec/models/lab_tech/speedup_spec.rb[1:10] | passed | 0.00067 seconds |
|
66
|
+
./spec/models/lab_tech/speedup_spec.rb[1:11] | passed | 0.01936 seconds |
|
67
|
+
./spec/models/lab_tech/speedup_spec.rb[1:12] | passed | 0.00072 seconds |
|
68
|
+
./spec/models/lab_tech/speedup_spec.rb[1:13] | passed | 0.00069 seconds |
|
69
|
+
./spec/models/lab_tech/summary_spec.rb[1:1:1] | passed | 0.00661 seconds |
|
70
|
+
./spec/models/lab_tech/summary_spec.rb[1:2:1] | passed | 0.03423 seconds |
|
71
|
+
./spec/models/lab_tech/summary_spec.rb[1:3:1] | passed | 0.03157 seconds |
|
72
|
+
./spec/models/lab_tech/summary_spec.rb[1:4:1] | passed | 0.01559 seconds |
|
73
|
+
./spec/models/lab_tech/summary_spec.rb[1:5:1] | passed | 0.03975 seconds |
|
74
|
+
./spec/models/lab_tech/summary_spec.rb[1:5:2] | passed | 0.02356 seconds |
|
75
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:1:1] | passed | 0.03779 seconds |
|
76
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:1:2] | passed | 0.03038 seconds |
|
77
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:2:1] | passed | 0.01578 seconds |
|
78
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:3:1] | passed | 0.02578 seconds |
|
79
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:4:1] | passed | 0.05467 seconds |
|
80
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:4:2] | passed | 0.0618 seconds |
|
81
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:4:3] | passed | 0.0536 seconds |
|
82
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:5:1] | passed | 0.07653 seconds |
|
83
|
+
./spec/models/lab_tech/summary_spec.rb[1:6:6:1] | passed | 0.16707 seconds |
|
84
|
+
./spec/models/lab_tech_spec.rb[1:1:1] | passed | 0.00121 seconds |
|
@@ -92,6 +92,21 @@ RSpec.describe LabTech::Experiment do
|
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
|
+
specify "clients can intercept the LabTech::Result before it gets recorded (EXPERIMENTAL)" do
|
96
|
+
LabTech.science "wibble" do |e|
|
97
|
+
e.context( { a: 1 } )
|
98
|
+
e.use { :hello_world }
|
99
|
+
e.try { :howdy_earth }
|
100
|
+
|
101
|
+
e.__after_recording__ do |result|
|
102
|
+
result.update context: { b: 2 }
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
result = experiment.results.first
|
107
|
+
expect( result.context ).to eq( { b: 2 } )
|
108
|
+
end
|
109
|
+
|
95
110
|
describe "diff-generating behavior" do
|
96
111
|
let(:result) { experiment.results.first }
|
97
112
|
|
@@ -100,7 +115,12 @@ RSpec.describe LabTech::Experiment do
|
|
100
115
|
e.use { :control }
|
101
116
|
e.try { :candidate }
|
102
117
|
|
103
|
-
e.diff { |control, candidate|
|
118
|
+
e.diff { |control, candidate|
|
119
|
+
# Make sure we pass values to the diff block, not the observations themselves
|
120
|
+
raise "nope" if control.is_a?(Scientist::Observation)
|
121
|
+
raise "nope" if candidate.is_a?(Scientist::Observation)
|
122
|
+
"this is a diff"
|
123
|
+
}
|
104
124
|
end
|
105
125
|
|
106
126
|
result = experiment.results.first
|
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.9
|
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-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 5.1.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: '7.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 5.1.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: '7.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: scientist
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|