lab_tech 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/spec/examples.txt CHANGED
@@ -1,79 +1,81 @@
1
1
  example_id | status | run_time |
2
2
  ---------------------------------------------------- | ------ | --------------- |
3
- ./spec/models/lab_tech/default_cleaner_spec.rb[1:1] | passed | 0.00112 seconds |
4
- ./spec/models/lab_tech/default_cleaner_spec.rb[1:2] | passed | 0.0078 seconds |
5
- ./spec/models/lab_tech/default_cleaner_spec.rb[1:3] | passed | 0.00039 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.00335 seconds |
8
- ./spec/models/lab_tech/experiment_spec.rb[1:1:2:1] | passed | 0.07101 seconds |
9
- ./spec/models/lab_tech/experiment_spec.rb[1:1:2:2] | passed | 0.01402 seconds |
10
- ./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:1] | passed | 0.01324 seconds |
11
- ./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:2] | passed | 0.01055 seconds |
12
- ./spec/models/lab_tech/experiment_spec.rb[1:1:2:4:1] | passed | 0.00826 seconds |
13
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:1] | passed | 0.00044 seconds |
14
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:2] | passed | 0.00034 seconds |
15
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:3] | passed | 0.00033 seconds |
16
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:4] | passed | 0.00043 seconds |
17
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:5] | passed | 0.00039 seconds |
18
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:6] | passed | 0.00033 seconds |
19
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:7] | passed | 0.00032 seconds |
20
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:8] | passed | 0.00034 seconds |
21
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:9] | passed | 0.00038 seconds |
22
- ./spec/models/lab_tech/percentile_spec.rb[1:1:1:10] | passed | 0.00038 seconds |
23
- ./spec/models/lab_tech/percentile_spec.rb[1:1:2:1] | passed | 0.00039 seconds |
24
- ./spec/models/lab_tech/percentile_spec.rb[1:1:2:2] | passed | 0.00034 seconds |
25
- ./spec/models/lab_tech/percentile_spec.rb[1:1:2:3] | passed | 0.00033 seconds |
26
- ./spec/models/lab_tech/percentile_spec.rb[1:1:2:4] | passed | 0.00031 seconds |
27
- ./spec/models/lab_tech/percentile_spec.rb[1:1:3:1] | passed | 0.00034 seconds |
28
- ./spec/models/lab_tech/percentile_spec.rb[1:1:3:2] | passed | 0.00032 seconds |
29
- ./spec/models/lab_tech/percentile_spec.rb[1:1:3:3] | passed | 0.00031 seconds |
30
- ./spec/models/lab_tech/percentile_spec.rb[1:1:3:4] | passed | 0.0003 seconds |
31
- ./spec/models/lab_tech/percentile_spec.rb[1:2:1] | passed | 0.00044 seconds |
32
- ./spec/models/lab_tech/percentile_spec.rb[1:2:2] | passed | 0.00043 seconds |
33
- ./spec/models/lab_tech/percentile_spec.rb[1:2:3] | passed | 0.00035 seconds |
34
- ./spec/models/lab_tech/percentile_spec.rb[1:2:4] | passed | 0.00036 seconds |
35
- ./spec/models/lab_tech/percentile_spec.rb[1:2:5] | passed | 0.00037 seconds |
36
- ./spec/models/lab_tech/percentile_spec.rb[1:3:1] | passed | 0.00047 seconds |
37
- ./spec/models/lab_tech/percentile_spec.rb[1:3:2] | passed | 0.00045 seconds |
38
- ./spec/models/lab_tech/percentile_spec.rb[1:3:3] | passed | 0.00044 seconds |
39
- ./spec/models/lab_tech/percentile_spec.rb[1:3:4] | passed | 0.00043 seconds |
40
- ./spec/models/lab_tech/percentile_spec.rb[1:3:5] | passed | 0.00045 seconds |
41
- ./spec/models/lab_tech/result_spec.rb[1:1:1] | passed | 0.01435 seconds |
42
- ./spec/models/lab_tech/result_spec.rb[1:1:2:1:1] | passed | 0.00917 seconds |
43
- ./spec/models/lab_tech/result_spec.rb[1:1:2:2:1] | passed | 0.01049 seconds |
44
- ./spec/models/lab_tech/result_spec.rb[1:1:2:3:1] | passed | 0.00984 seconds |
45
- ./spec/models/lab_tech/result_spec.rb[1:1:2:3:2] | passed | 0.00965 seconds |
46
- ./spec/models/lab_tech/result_spec.rb[1:1:2:4:1] | passed | 0.00998 seconds |
47
- ./spec/models/lab_tech/result_spec.rb[1:1:3:1] | passed | 0.00759 seconds |
48
- ./spec/models/lab_tech/result_spec.rb[1:1:4:1] | passed | 0.01068 seconds |
49
- ./spec/models/lab_tech/result_spec.rb[1:1:5:1] | passed | 0.01141 seconds |
50
- ./spec/models/lab_tech/result_spec.rb[1:1:6] | passed | 0.01769 seconds |
51
- ./spec/models/lab_tech/speedup_spec.rb[1:1] | passed | 0.00127 seconds |
52
- ./spec/models/lab_tech/speedup_spec.rb[1:2] | passed | 0.0004 seconds |
53
- ./spec/models/lab_tech/speedup_spec.rb[1:3] | passed | 0.00037 seconds |
54
- ./spec/models/lab_tech/speedup_spec.rb[1:4] | passed | 0.00036 seconds |
55
- ./spec/models/lab_tech/speedup_spec.rb[1:5] | passed | 0.00036 seconds |
56
- ./spec/models/lab_tech/speedup_spec.rb[1:6] | passed | 0.00036 seconds |
57
- ./spec/models/lab_tech/speedup_spec.rb[1:7] | passed | 0.00035 seconds |
58
- ./spec/models/lab_tech/speedup_spec.rb[1:8] | passed | 0.00036 seconds |
59
- ./spec/models/lab_tech/speedup_spec.rb[1:9] | passed | 0.00055 seconds |
60
- ./spec/models/lab_tech/speedup_spec.rb[1:10] | passed | 0.00045 seconds |
61
- ./spec/models/lab_tech/speedup_spec.rb[1:11] | passed | 0.00037 seconds |
62
- ./spec/models/lab_tech/speedup_spec.rb[1:12] | passed | 0.00047 seconds |
63
- ./spec/models/lab_tech/speedup_spec.rb[1:13] | passed | 0.00048 seconds |
64
- ./spec/models/lab_tech/summary_spec.rb[1:1:1] | passed | 0.0045 seconds |
65
- ./spec/models/lab_tech/summary_spec.rb[1:2:1] | passed | 0.03011 seconds |
66
- ./spec/models/lab_tech/summary_spec.rb[1:3:1] | passed | 0.01405 seconds |
67
- ./spec/models/lab_tech/summary_spec.rb[1:4:1] | passed | 0.01349 seconds |
68
- ./spec/models/lab_tech/summary_spec.rb[1:5:1] | passed | 0.01768 seconds |
69
- ./spec/models/lab_tech/summary_spec.rb[1:5:2] | passed | 0.01745 seconds |
70
- ./spec/models/lab_tech/summary_spec.rb[1:6:1:1] | passed | 0.0281 seconds |
71
- ./spec/models/lab_tech/summary_spec.rb[1:6:1:2] | passed | 0.02124 seconds |
72
- ./spec/models/lab_tech/summary_spec.rb[1:6:2:1] | passed | 0.02179 seconds |
73
- ./spec/models/lab_tech/summary_spec.rb[1:6:3:1] | passed | 0.02039 seconds |
74
- ./spec/models/lab_tech/summary_spec.rb[1:6:4:1] | passed | 0.07298 seconds |
75
- ./spec/models/lab_tech/summary_spec.rb[1:6:4:2] | passed | 0.05676 seconds |
76
- ./spec/models/lab_tech/summary_spec.rb[1:6:4:3] | passed | 0.05425 seconds |
77
- ./spec/models/lab_tech/summary_spec.rb[1:6:5:1] | passed | 0.16329 seconds |
78
- ./spec/models/lab_tech/summary_spec.rb[1:6:6:1] | passed | 0.16302 seconds |
79
- ./spec/models/lab_tech_spec.rb[1:1:1] | passed | 0.00093 seconds |
3
+ ./spec/models/lab_tech/default_cleaner_spec.rb[1:1] | passed | 0.00049 seconds |
4
+ ./spec/models/lab_tech/default_cleaner_spec.rb[1:2] | passed | 0.0017 seconds |
5
+ ./spec/models/lab_tech/default_cleaner_spec.rb[1:3] | passed | 0.00042 seconds |
6
+ ./spec/models/lab_tech/default_cleaner_spec.rb[1:4] | passed | 0.00277 seconds |
7
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:1:1] | passed | 0.00843 seconds |
8
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:2:1] | passed | 0.03526 seconds |
9
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:2:2] | passed | 0.0105 seconds |
10
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:1] | passed | 0.01102 seconds |
11
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:2:3:2] | passed | 0.01048 seconds |
12
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:2:4:1] | passed | 0.02312 seconds |
13
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:2:5:1] | passed | 0.02608 seconds |
14
+ ./spec/models/lab_tech/experiment_spec.rb[1:1:2:5:2] | passed | 0.05657 seconds |
15
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:1] | passed | 0.00026 seconds |
16
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:2] | passed | 0.0003 seconds |
17
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:3] | passed | 0.00026 seconds |
18
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:4] | passed | 0.00027 seconds |
19
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:5] | passed | 0.00026 seconds |
20
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:6] | passed | 0.00026 seconds |
21
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:7] | passed | 0.00031 seconds |
22
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:8] | passed | 0.00026 seconds |
23
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:9] | passed | 0.00027 seconds |
24
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:1:10] | passed | 0.00026 seconds |
25
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:2:1] | passed | 0.00027 seconds |
26
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:2:2] | passed | 0.00043 seconds |
27
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:2:3] | passed | 0.00027 seconds |
28
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:2:4] | passed | 0.00043 seconds |
29
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:3:1] | passed | 0.00026 seconds |
30
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:3:2] | passed | 0.00029 seconds |
31
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:3:3] | passed | 0.0003 seconds |
32
+ ./spec/models/lab_tech/percentile_spec.rb[1:1:3:4] | passed | 0.00027 seconds |
33
+ ./spec/models/lab_tech/percentile_spec.rb[1:2:1] | passed | 0.00033 seconds |
34
+ ./spec/models/lab_tech/percentile_spec.rb[1:2:2] | passed | 0.00028 seconds |
35
+ ./spec/models/lab_tech/percentile_spec.rb[1:2:3] | passed | 0.00027 seconds |
36
+ ./spec/models/lab_tech/percentile_spec.rb[1:2:4] | passed | 0.0003 seconds |
37
+ ./spec/models/lab_tech/percentile_spec.rb[1:2:5] | passed | 0.0003 seconds |
38
+ ./spec/models/lab_tech/percentile_spec.rb[1:3:1] | passed | 0.00039 seconds |
39
+ ./spec/models/lab_tech/percentile_spec.rb[1:3:2] | passed | 0.00064 seconds |
40
+ ./spec/models/lab_tech/percentile_spec.rb[1:3:3] | passed | 0.0004 seconds |
41
+ ./spec/models/lab_tech/percentile_spec.rb[1:3:4] | passed | 0.00041 seconds |
42
+ ./spec/models/lab_tech/percentile_spec.rb[1:3:5] | passed | 0.00044 seconds |
43
+ ./spec/models/lab_tech/result_spec.rb[1:1:1] | passed | 0.01021 seconds |
44
+ ./spec/models/lab_tech/result_spec.rb[1:1:2:1:1] | passed | 0.00885 seconds |
45
+ ./spec/models/lab_tech/result_spec.rb[1:1:2:2:1] | passed | 0.00891 seconds |
46
+ ./spec/models/lab_tech/result_spec.rb[1:1:2:3:1] | passed | 0.00925 seconds |
47
+ ./spec/models/lab_tech/result_spec.rb[1:1:2:3:2] | passed | 0.0089 seconds |
48
+ ./spec/models/lab_tech/result_spec.rb[1:1:2:4:1] | passed | 0.00885 seconds |
49
+ ./spec/models/lab_tech/result_spec.rb[1:1:3:1] | passed | 0.00659 seconds |
50
+ ./spec/models/lab_tech/result_spec.rb[1:1:4:1] | passed | 0.00997 seconds |
51
+ ./spec/models/lab_tech/result_spec.rb[1:1:5:1] | passed | 0.01025 seconds |
52
+ ./spec/models/lab_tech/result_spec.rb[1:1:6] | passed | 0.01648 seconds |
53
+ ./spec/models/lab_tech/speedup_spec.rb[1:1] | passed | 0.00028 seconds |
54
+ ./spec/models/lab_tech/speedup_spec.rb[1:2] | passed | 0.0003 seconds |
55
+ ./spec/models/lab_tech/speedup_spec.rb[1:3] | passed | 0.00027 seconds |
56
+ ./spec/models/lab_tech/speedup_spec.rb[1:4] | passed | 0.00034 seconds |
57
+ ./spec/models/lab_tech/speedup_spec.rb[1:5] | passed | 0.00027 seconds |
58
+ ./spec/models/lab_tech/speedup_spec.rb[1:6] | passed | 0.00028 seconds |
59
+ ./spec/models/lab_tech/speedup_spec.rb[1:7] | passed | 0.00028 seconds |
60
+ ./spec/models/lab_tech/speedup_spec.rb[1:8] | passed | 0.00028 seconds |
61
+ ./spec/models/lab_tech/speedup_spec.rb[1:9] | passed | 0.00049 seconds |
62
+ ./spec/models/lab_tech/speedup_spec.rb[1:10] | passed | 0.00039 seconds |
63
+ ./spec/models/lab_tech/speedup_spec.rb[1:11] | passed | 0.0003 seconds |
64
+ ./spec/models/lab_tech/speedup_spec.rb[1:12] | passed | 0.00046 seconds |
65
+ ./spec/models/lab_tech/speedup_spec.rb[1:13] | passed | 0.0004 seconds |
66
+ ./spec/models/lab_tech/summary_spec.rb[1:1:1] | passed | 0.00248 seconds |
67
+ ./spec/models/lab_tech/summary_spec.rb[1:2:1] | passed | 0.01764 seconds |
68
+ ./spec/models/lab_tech/summary_spec.rb[1:3:1] | passed | 0.00993 seconds |
69
+ ./spec/models/lab_tech/summary_spec.rb[1:4:1] | passed | 0.00951 seconds |
70
+ ./spec/models/lab_tech/summary_spec.rb[1:5:1] | passed | 0.00957 seconds |
71
+ ./spec/models/lab_tech/summary_spec.rb[1:5:2] | passed | 0.00924 seconds |
72
+ ./spec/models/lab_tech/summary_spec.rb[1:6:1:1] | passed | 0.01482 seconds |
73
+ ./spec/models/lab_tech/summary_spec.rb[1:6:1:2] | passed | 0.01515 seconds |
74
+ ./spec/models/lab_tech/summary_spec.rb[1:6:2:1] | passed | 0.0203 seconds |
75
+ ./spec/models/lab_tech/summary_spec.rb[1:6:3:1] | passed | 0.02004 seconds |
76
+ ./spec/models/lab_tech/summary_spec.rb[1:6:4:1] | passed | 0.05264 seconds |
77
+ ./spec/models/lab_tech/summary_spec.rb[1:6:4:2] | passed | 0.06423 seconds |
78
+ ./spec/models/lab_tech/summary_spec.rb[1:6:4:3] | passed | 0.0527 seconds |
79
+ ./spec/models/lab_tech/summary_spec.rb[1:6:5:1] | passed | 0.05967 seconds |
80
+ ./spec/models/lab_tech/summary_spec.rb[1:6:6:1] | passed | 0.14403 seconds |
81
+ ./spec/models/lab_tech_spec.rb[1:1:1] | passed | 0.00092 seconds |
@@ -104,7 +104,38 @@ RSpec.describe LabTech::Experiment do
104
104
  expect( experiment.other_error_count ).to eq( 0 )
105
105
  end
106
106
  end
107
- end
107
+ end
108
+
109
+ describe "summary output" do
110
+ before do
111
+ LabTech.science "wibble" do |e|
112
+ e.use { :wibble } ; e.try { :wibble }
113
+ end
114
+ LabTech.science "wibble" do |e|
115
+ e.use { :wibble } ; e.try { :florp }
116
+ end
117
+ LabTech.science "wibble" do |e|
118
+ e.use { :wibble } ; e.try { fail "nope" }
119
+ end
120
+ end
121
+
122
+ specify "compare_mismatches" do
123
+ io = StringIO.new
124
+ LabTech.compare_mismatches "wibble", io: io
125
+ out = io.string
126
+ expect(out).to match( /Comparing results for wibble:/ )
127
+ expect(out).to match( /control # => :wibble/ )
128
+ expect(out).to match( /candidate # => :florp/ )
129
+ end
130
+
131
+ specify "summarize_errors" do
132
+ io = StringIO.new
133
+ LabTech.summarize_errors "wibble", io: io
134
+ out = io.string
135
+ expect(out).to match( /Summarizing errors for wibble:/ )
136
+ expect(out).to include( " * RuntimeError: nope" )
137
+ end
138
+ end
108
139
  end
109
140
  end
110
141
  end
@@ -12,20 +12,6 @@ RSpec.describe LabTech::Summary do
12
12
  e.try { cand.respond_to?(:call) ? cand.call : cand }
13
13
  end
14
14
 
15
- #######################################
16
-
17
- ######## ##### ###### #####
18
- ## ## ## ## ## ## ##
19
- ## ## ## ## ## ## ##
20
- ## ## ## ## ## ## ##
21
- ## ## ## ## ## ## ##
22
- ## ## ## ## ## ## ##
23
- ## ##### ###### #####
24
-
25
- #######################################
26
- # TODO: use Scientist's fabricate_durations_for_testing_purposes to make
27
- # the below comment (and code?) unnecessary
28
- #######################################
29
15
  # Don't bother stubbing Scientist's clock; you'll get the wrong results 50%
30
16
  # of the time because it runs the `try` and `use` blocks in random order,
31
17
  # and then you'll be very very confused.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lab_tech
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Livingston-Gray
@@ -150,6 +150,7 @@ files:
150
150
  - spec/dummy/config/puma.rb
151
151
  - spec/dummy/config/routes.rb
152
152
  - spec/dummy/config/spring.rb
153
+ - spec/dummy/db/development.sqlite3
153
154
  - spec/dummy/db/schema.rb
154
155
  - spec/dummy/db/test.sqlite3
155
156
  - spec/dummy/log/development.log
@@ -224,6 +225,7 @@ test_files:
224
225
  - spec/dummy/Rakefile
225
226
  - spec/dummy/db/schema.rb
226
227
  - spec/dummy/db/test.sqlite3
228
+ - spec/dummy/db/development.sqlite3
227
229
  - spec/dummy/log/test.log
228
230
  - spec/dummy/log/development.log
229
231
  - spec/examples.txt