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.
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.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 |
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| "this is a diff" }
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.5
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-02-08 00:00:00.000000000 Z
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: 6.1.0
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: 6.1.0
32
+ version: '7.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: scientist
35
35
  requirement: !ruby/object:Gem::Requirement