toji 1.6.7 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/calendar.ipynb +123 -0
- data/example/{schedule.yaml → calendar.yaml} +6 -30
- data/example/calendar_file.ipynb +338 -0
- data/example/example_core.rb +336 -0
- data/example/kake_recipe.rb +27 -0
- data/example/koji_making.ipynb +16 -15
- data/example/koji_making.rb +2 -1
- data/example/koji_making.yaml +9 -9
- data/example/koji_making_multi.ipynb +26 -25
- data/example/koji_recipe.rb +1 -1
- data/example/moromi.ipynb +25 -24
- data/example/moromi.rb +1 -0
- data/example/moromi.yaml +10 -4
- data/example/recipe.rb +75 -0
- data/example/shubo.ipynb +15 -14
- data/example/shubo.rb +2 -1
- data/example/shubo.yaml +10 -10
- data/lib/toji.rb +3 -1
- data/lib/toji/brew.rb +1 -2
- data/lib/toji/brew/base.rb +7 -71
- data/lib/toji/brew/builder.rb +47 -4
- data/lib/toji/brew/graph/bmd.rb +0 -1
- data/lib/toji/brew/graph/progress.rb +1 -1
- data/lib/toji/brew/koji.rb +0 -10
- data/lib/toji/brew/moromi.rb +2 -36
- data/lib/toji/brew/shubo.rb +0 -5
- data/lib/toji/brew/state.rb +90 -103
- data/lib/toji/brew/state_wrapper.rb +135 -0
- data/lib/toji/calendar.rb +123 -0
- data/lib/toji/{schedule → calendar}/date_column.rb +3 -6
- data/lib/toji/{schedule → calendar}/date_row.rb +6 -6
- data/lib/toji/ingredient.rb +10 -0
- data/lib/toji/ingredient/kake.rb +17 -0
- data/lib/toji/ingredient/kake/actual.rb +27 -0
- data/lib/toji/ingredient/kake/base.rb +18 -0
- data/lib/toji/ingredient/kake/expected.rb +41 -0
- data/lib/toji/ingredient/koji.rb +19 -0
- data/lib/toji/ingredient/koji/actual.rb +30 -0
- data/lib/toji/ingredient/koji/actual_fermentable.rb +15 -0
- data/lib/toji/ingredient/koji/base.rb +35 -0
- data/lib/toji/ingredient/koji/expected.rb +46 -0
- data/lib/toji/ingredient/koji/expected_fermentable.rb +15 -0
- data/lib/toji/{recipe → ingredient}/koji_rate.rb +1 -1
- data/lib/toji/ingredient/rice.rb +10 -0
- data/lib/toji/ingredient/rice/actual_steamable.rb +27 -0
- data/lib/toji/ingredient/rice/base.rb +41 -0
- data/lib/toji/ingredient/rice/expected_steamable.rb +29 -0
- data/lib/toji/ingredient/rice_rate.rb +35 -0
- data/lib/toji/product.rb +65 -0
- data/lib/toji/{schedule/product_event.rb → product/event.rb} +4 -4
- data/lib/toji/recipe.rb +120 -5
- data/lib/toji/recipe/step.rb +46 -59
- data/lib/toji/version.rb +1 -1
- metadata +31 -37
- data/example/rice_recipe.rb +0 -28
- data/example/schedule.ipynb +0 -393
- data/example/schedule_file.ipynb +0 -337
- data/example/three_step_mashing_recipe.rb +0 -67
- data/lib/toji/brew/state_accessor.rb +0 -13
- data/lib/toji/brew/state_record.rb +0 -72
- data/lib/toji/recipe/ingredient.rb +0 -10
- data/lib/toji/recipe/ingredient/koji.rb +0 -21
- data/lib/toji/recipe/ingredient/koji/actual.rb +0 -32
- data/lib/toji/recipe/ingredient/koji/actual_fermentable.rb +0 -17
- data/lib/toji/recipe/ingredient/koji/base.rb +0 -37
- data/lib/toji/recipe/ingredient/koji/expected.rb +0 -48
- data/lib/toji/recipe/ingredient/koji/expected_fermentable.rb +0 -17
- data/lib/toji/recipe/ingredient/rice.rb +0 -21
- data/lib/toji/recipe/ingredient/rice/actual.rb +0 -29
- data/lib/toji/recipe/ingredient/rice/actual_steamable.rb +0 -29
- data/lib/toji/recipe/ingredient/rice/base.rb +0 -51
- data/lib/toji/recipe/ingredient/rice/expected.rb +0 -43
- data/lib/toji/recipe/ingredient/rice/expected_steamable.rb +0 -31
- data/lib/toji/recipe/ingredient/yeast.rb +0 -21
- data/lib/toji/recipe/rice_rate.rb +0 -10
- data/lib/toji/recipe/rice_rate/base.rb +0 -21
- data/lib/toji/recipe/rice_rate/cooked.rb +0 -67
- data/lib/toji/recipe/rice_rate/steamed.rb +0 -30
- data/lib/toji/recipe/three_step_mashing.rb +0 -274
- data/lib/toji/recipe/yeast_rate.rb +0 -41
- data/lib/toji/schedule.rb +0 -11
- data/lib/toji/schedule/calendar.rb +0 -139
- data/lib/toji/schedule/date_interval_enumerator.rb +0 -45
- data/lib/toji/schedule/product.rb +0 -96
@@ -0,0 +1,336 @@
|
|
1
|
+
require 'securerandom'
|
2
|
+
|
3
|
+
module Example
|
4
|
+
|
5
|
+
module Brew
|
6
|
+
class State
|
7
|
+
include Toji::Brew::State
|
8
|
+
|
9
|
+
def self.create(val)
|
10
|
+
s = new
|
11
|
+
KEYS.each {|k|
|
12
|
+
s.send("#{k}=", val[k])
|
13
|
+
}
|
14
|
+
s
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
module BrewGenerator
|
20
|
+
def load_hash(hash)
|
21
|
+
hash = hash.deep_symbolize_keys
|
22
|
+
|
23
|
+
builder
|
24
|
+
.add((hash[:states] || []).map{|s| State.create(s)})
|
25
|
+
.date_line(hash[:date_line] || 0)
|
26
|
+
.prefix_day_labels(hash[:prefix_day_labels])
|
27
|
+
.build
|
28
|
+
end
|
29
|
+
|
30
|
+
def load_yaml_file(fname)
|
31
|
+
hash = YAML.load_file(fname)
|
32
|
+
load_hash(hash)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
class Koji < Toji::Brew::Koji
|
38
|
+
extend BrewGenerator
|
39
|
+
end
|
40
|
+
|
41
|
+
class Shubo < Toji::Brew::Shubo
|
42
|
+
extend BrewGenerator
|
43
|
+
end
|
44
|
+
|
45
|
+
class Moromi < Toji::Brew::Moromi
|
46
|
+
extend BrewGenerator
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
class Step
|
52
|
+
include Toji::Recipe::Step
|
53
|
+
|
54
|
+
# 総重量
|
55
|
+
def weight_total
|
56
|
+
kake + koji + water + lactic_acid + alcohol + yeast
|
57
|
+
end
|
58
|
+
|
59
|
+
def to_h
|
60
|
+
{
|
61
|
+
name: name,
|
62
|
+
kake: kake,
|
63
|
+
koji: koji,
|
64
|
+
water: water,
|
65
|
+
lactic_acid: lactic_acid,
|
66
|
+
alcohol: alcohol,
|
67
|
+
yeast: yeast,
|
68
|
+
koji_interval_days: koji_interval_days,
|
69
|
+
kake_interval_days: kake_interval_days,
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.create(name:, kake: 0, koji: 0, water: 0, lactic_acid: 0, alcohol: 0, yeast: 0, koji_interval_days: 0, kake_interval_days: 0)
|
74
|
+
new.tap {|o|
|
75
|
+
o.name = name
|
76
|
+
o.kake = kake.to_f
|
77
|
+
o.koji = koji.to_f
|
78
|
+
o.water = water.to_f
|
79
|
+
o.lactic_acid = lactic_acid.to_f
|
80
|
+
o.alcohol = alcohol.to_f
|
81
|
+
o.yeast = yeast.to_f
|
82
|
+
o.koji_interval_days = koji_interval_days.to_i
|
83
|
+
o.kake_interval_days = kake_interval_days.to_i
|
84
|
+
}
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
class Recipe
|
90
|
+
include Toji::Recipe
|
91
|
+
|
92
|
+
def initialize
|
93
|
+
@steps = []
|
94
|
+
end
|
95
|
+
|
96
|
+
#def to_h
|
97
|
+
# {
|
98
|
+
# steps: steps.map(&:to_h),
|
99
|
+
# cumulative_rice_totals: cumulative_rice_totals,
|
100
|
+
# cumulative_shubo_rates: cumulative_shubo_rates,
|
101
|
+
# shubo_rate: shubo_rate,
|
102
|
+
# rice_rates: rice_rates,
|
103
|
+
# }
|
104
|
+
#end
|
105
|
+
|
106
|
+
def self.create(steps)
|
107
|
+
new.tap {|o|
|
108
|
+
o.steps = steps
|
109
|
+
}
|
110
|
+
end
|
111
|
+
|
112
|
+
# 乳酸は汲水100L当たり比重1.21の乳酸(90%乳酸と称される)を650〜720ml添加する。
|
113
|
+
# 添加する酵母の量は、酒母の総米100kg当たり協会酵母アンプル1〜2本である。
|
114
|
+
#
|
115
|
+
# 出典: 酒造教本 P80
|
116
|
+
#
|
117
|
+
# ここでは間をとって乳酸は685ml、酵母は1.5本とする。
|
118
|
+
TEMPLATES = {
|
119
|
+
# 酒造教本による標準型仕込配合
|
120
|
+
# 出典: 酒造教本 P97
|
121
|
+
sokujo_textbook: create(
|
122
|
+
[
|
123
|
+
Step.create(
|
124
|
+
name: :moto,
|
125
|
+
kake: 45,
|
126
|
+
koji: 20,
|
127
|
+
water: 70,
|
128
|
+
lactic_acid: 70/100.0*0.685,
|
129
|
+
yeast: (45+20)/100.0*1.5,
|
130
|
+
koji_interval_days: 0,
|
131
|
+
kake_interval_days: 5,
|
132
|
+
),
|
133
|
+
Step.create(
|
134
|
+
name: :soe,
|
135
|
+
kake: 100,
|
136
|
+
koji: 40,
|
137
|
+
water: 130,
|
138
|
+
koji_interval_days: 14,
|
139
|
+
kake_interval_days: 15,
|
140
|
+
),
|
141
|
+
Step.create(
|
142
|
+
name: :naka,
|
143
|
+
kake: 215,
|
144
|
+
koji: 60,
|
145
|
+
water: 330,
|
146
|
+
koji_interval_days: 0,
|
147
|
+
kake_interval_days: 2,
|
148
|
+
),
|
149
|
+
Step.create(
|
150
|
+
name: :tome,
|
151
|
+
kake: 360,
|
152
|
+
koji: 80,
|
153
|
+
water: 630,
|
154
|
+
koji_interval_days: 0,
|
155
|
+
kake_interval_days: 1,
|
156
|
+
),
|
157
|
+
Step.create(
|
158
|
+
name: :yodan,
|
159
|
+
kake: 80,
|
160
|
+
water: 120,
|
161
|
+
kake_interval_days: 25,
|
162
|
+
),
|
163
|
+
].map(&:freeze).freeze
|
164
|
+
).freeze,
|
165
|
+
# 灘における仕込配合の平均値
|
166
|
+
# 出典: http://www.nada-ken.com/main/jp/index_shi/234.html
|
167
|
+
sokujo_nada: create(
|
168
|
+
[
|
169
|
+
Step.create(
|
170
|
+
name: :moto,
|
171
|
+
kake: 93,
|
172
|
+
koji: 47,
|
173
|
+
water: 170,
|
174
|
+
lactic_acid: 170/100.0*0.685,
|
175
|
+
yeast: (93+47)/100.0*1.5,
|
176
|
+
koji_interval_days: 0,
|
177
|
+
kake_interval_days: 5,
|
178
|
+
),
|
179
|
+
Step.create(
|
180
|
+
name: :soe,
|
181
|
+
kake: 217,
|
182
|
+
koji: 99,
|
183
|
+
water: 270,
|
184
|
+
koji_interval_days: 14,
|
185
|
+
kake_interval_days: 15,
|
186
|
+
),
|
187
|
+
Step.create(
|
188
|
+
name: :naka,
|
189
|
+
kake: 423,
|
190
|
+
koji: 143,
|
191
|
+
water: 670,
|
192
|
+
koji_interval_days: 0,
|
193
|
+
kake_interval_days: 2,
|
194
|
+
),
|
195
|
+
Step.create(
|
196
|
+
name: :tome,
|
197
|
+
kake: 813,
|
198
|
+
koji: 165,
|
199
|
+
water: 1330,
|
200
|
+
koji_interval_days: 0,
|
201
|
+
kake_interval_days: 1,
|
202
|
+
),
|
203
|
+
Step.create(
|
204
|
+
name: :alcohol,
|
205
|
+
alcohol: 900
|
206
|
+
),
|
207
|
+
].map(&:freeze).freeze
|
208
|
+
).freeze,
|
209
|
+
# 簡易酒母省略仕込
|
210
|
+
# 出典: https://www.jstage.jst.go.jp/article/jbrewsocjapan1915/60/11/60_11_999/_article/-char/ja/
|
211
|
+
simple_sokujo_himeno: create(
|
212
|
+
[
|
213
|
+
Step.create(
|
214
|
+
name: :moto,
|
215
|
+
kake: 0,
|
216
|
+
koji: 70,
|
217
|
+
water: 245,
|
218
|
+
lactic_acid: 1.6,
|
219
|
+
yeast: 5,
|
220
|
+
koji_interval_days: 0,
|
221
|
+
kake_interval_days: 6,
|
222
|
+
),
|
223
|
+
Step.create(
|
224
|
+
name: :soe,
|
225
|
+
kake: 130,
|
226
|
+
koji: 0,
|
227
|
+
water: 0,
|
228
|
+
koji_interval_days: 0,
|
229
|
+
kake_interval_days: 1,
|
230
|
+
),
|
231
|
+
Step.create(
|
232
|
+
name: :naka,
|
233
|
+
kake: 300,
|
234
|
+
koji: 100,
|
235
|
+
water: 400,
|
236
|
+
koji_interval_days: 0,
|
237
|
+
kake_interval_days: 2,
|
238
|
+
),
|
239
|
+
Step.create(
|
240
|
+
name: :tome,
|
241
|
+
kake: 490,
|
242
|
+
koji: 110,
|
243
|
+
water: 800,
|
244
|
+
koji_interval_days: 0,
|
245
|
+
kake_interval_days: 1,
|
246
|
+
),
|
247
|
+
Step.create(
|
248
|
+
name: :yodan,
|
249
|
+
water: 255
|
250
|
+
),
|
251
|
+
].map(&:freeze).freeze
|
252
|
+
).freeze,
|
253
|
+
}.freeze
|
254
|
+
end
|
255
|
+
|
256
|
+
|
257
|
+
class Product
|
258
|
+
include Toji::Product
|
259
|
+
|
260
|
+
attr_accessor :description
|
261
|
+
attr_accessor :color
|
262
|
+
|
263
|
+
def initialize(reduce_key, name, description, recipe, start_date, color=nil)
|
264
|
+
@reduce_key = reduce_key || SecureRandom.uuid
|
265
|
+
@name = name
|
266
|
+
@description = description
|
267
|
+
@recipe = recipe
|
268
|
+
@start_date = start_date
|
269
|
+
@color = color
|
270
|
+
end
|
271
|
+
|
272
|
+
def to_h
|
273
|
+
{
|
274
|
+
id: id,
|
275
|
+
name: name,
|
276
|
+
description: @description,
|
277
|
+
recipe: @recipe.table_data,
|
278
|
+
start_date: @start_date,
|
279
|
+
koji_dates: koji_dates,
|
280
|
+
kake_dates: kake_dates,
|
281
|
+
events: events.map(&:to_h),
|
282
|
+
events_group: events_group,
|
283
|
+
color: @color,
|
284
|
+
}
|
285
|
+
end
|
286
|
+
|
287
|
+
def self.create(args)
|
288
|
+
if self===args
|
289
|
+
args
|
290
|
+
elsif Hash===args
|
291
|
+
recipe = args.fetch(:recipe)
|
292
|
+
if Symbol===recipe
|
293
|
+
recipe = Recipe::TEMPLATES.fetch(recipe)
|
294
|
+
end
|
295
|
+
if args[:scale]
|
296
|
+
recipe = recipe.scale(args[:scale])
|
297
|
+
end
|
298
|
+
if args[:round]
|
299
|
+
recipe = recipe.round(args[:round])
|
300
|
+
end
|
301
|
+
|
302
|
+
new(
|
303
|
+
args[:id],
|
304
|
+
args[:name],
|
305
|
+
args[:description],
|
306
|
+
recipe,
|
307
|
+
args[:start_date],
|
308
|
+
args[:color]
|
309
|
+
)
|
310
|
+
else
|
311
|
+
raise "not supported class: #{args.class}"
|
312
|
+
end
|
313
|
+
end
|
314
|
+
end
|
315
|
+
|
316
|
+
|
317
|
+
class Calendar < Toji::Calendar
|
318
|
+
|
319
|
+
def self.load_hash(hash)
|
320
|
+
hash = hash.deep_symbolize_keys
|
321
|
+
products = hash[:products] || []
|
322
|
+
|
323
|
+
cal = new
|
324
|
+
products.each {|product|
|
325
|
+
cal.add(Product.create(product))
|
326
|
+
}
|
327
|
+
|
328
|
+
cal
|
329
|
+
end
|
330
|
+
|
331
|
+
def self.load_yaml_file(fname)
|
332
|
+
hash = YAML.load_file(fname)
|
333
|
+
load_hash(hash)
|
334
|
+
end
|
335
|
+
end
|
336
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'toji'
|
2
|
+
require 'terminal-table'
|
3
|
+
|
4
|
+
kake = Toji::Ingredient::Kake.expected(100, rice_rate: Toji::Ingredient::RiceRate::DEFAULT)
|
5
|
+
|
6
|
+
table = Terminal::Table.new do |t|
|
7
|
+
t << ["", "分量", "白米を基準とした歩合"]
|
8
|
+
t << :separator
|
9
|
+
t << ["蒸米", kake.steamed&.round(2), (1.0 + kake.steamed_rate)&.round(2)]
|
10
|
+
t << [" 白米", kake.raw&.round(2), 1.0]
|
11
|
+
t << [" 汲水", kake.soaking_water&.round(2), kake.soaked_rate&.round(2)]
|
12
|
+
end
|
13
|
+
puts table
|
14
|
+
puts
|
15
|
+
|
16
|
+
table = Terminal::Table.new do |t|
|
17
|
+
t << ["工程", "原料", "分量"]
|
18
|
+
t << :separator
|
19
|
+
t << ["洗米・浸漬", "白米", kake.raw&.round(2)]
|
20
|
+
t << ["", "吸水増加量", kake.soaking_water&.round(2)]
|
21
|
+
t << :separator
|
22
|
+
t << ["水切り", "浸漬米", kake.soaked&.round(2)]
|
23
|
+
t << ["", "蒸発・炊飯前の汲水", kake.steaming_water&.round(2)]
|
24
|
+
t << :separator
|
25
|
+
t << ["蒸し", "蒸米", kake.steamed&.round(2)]
|
26
|
+
end
|
27
|
+
puts table
|
data/example/koji_making.ipynb
CHANGED
@@ -14,25 +14,25 @@
|
|
14
14
|
" </script>\n",
|
15
15
|
"\n",
|
16
16
|
"\n",
|
17
|
-
"<div id=\"
|
17
|
+
"<div id=\"00e78a09-9c1b-446e-bd60-5f7aa2f3cbc0\" style=\"height: 100%; width: 100%;\"></div>\n",
|
18
18
|
"\n",
|
19
19
|
"<script>\n",
|
20
20
|
" require(['plotly'], function(Plotly) { \n",
|
21
21
|
"Plotly.newPlot(\n",
|
22
|
-
" '
|
22
|
+
" '00e78a09-9c1b-446e-bd60-5f7aa2f3cbc0',\n",
|
23
23
|
" [{\"x\":[0,32400.0,36000.0,64800.0,64801.0,108000.0,108001.0,136800.0,136801.0,158400.0,158401.0,172800.0,190800.0],\"y\":[null,35.0,32.0,32.0,31.0,35.0,33.0,37.0,35.0,38.0,37.0,40.0,40.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"temps\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[0,32400.0,36000.0,64800.0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,28.0,28.0,28.0,28.0,28.0,28.0,28.0,28.0],\"text\":[null,\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"room_temp\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#2ca02c\"}},{\"x\":[0,108000.0,136800.0,158400.0,172800.0,190800.0],\"y\":[null,4,4,5,5,5],\"text\":[null,\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],\"name\":\"room_psychrometry\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#d62728\"}}],\n",
|
24
|
-
" {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800],\"ticktext\":[1
|
24
|
+
" {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800],\"ticktext\":[\"1\",\"2\",\"3\"]},\"annotations\":[]},\n",
|
25
25
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
26
26
|
")\n",
|
27
27
|
"\n",
|
28
28
|
"window.addEventListener('resize', function() {\n",
|
29
|
-
" Plotly.Plots.resize(document.getElementById('
|
29
|
+
" Plotly.Plots.resize(document.getElementById('00e78a09-9c1b-446e-bd60-5f7aa2f3cbc0'))\n",
|
30
30
|
"})\n",
|
31
31
|
" }) \n",
|
32
32
|
"</script>"
|
33
33
|
],
|
34
34
|
"text/plain": [
|
35
|
-
"#<Plotly::Offline::HTML:
|
35
|
+
"#<Plotly::Offline::HTML:0x00007fd362298bb8 @id=\"00e78a09-9c1b-446e-bd60-5f7aa2f3cbc0\", @data=[{:x=>[0, 32400.0, 36000.0, 64800.0, 64801.0, 108000.0, 108001.0, 136800.0, 136801.0, 158400.0, 158401.0, 172800.0, 190800.0], :y=>[nil, 35.0, 32.0, 32.0, 31.0, 35.0, 33.0, 37.0, 35.0, 38.0, 37.0, 40.0, 40.0], :text=>[nil, \"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"temps\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[0, 32400.0, 36000.0, 64800.0, 108000.0, 136800.0, 158400.0, 172800.0, 190800.0], :y=>[nil, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0], :text=>[nil, \"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"room_temp\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#2ca02c\"}}, {:x=>[0, 108000.0, 136800.0, 158400.0, 172800.0, 190800.0], :y=>[nil, 4, 4, 5, 5, 5], :text=>[nil, \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], :name=>\"room_psychrometry\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#d62728\"}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800], :ticktext=>[\"1\", \"2\", \"3\"]}, :annotations=>[]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
36
36
|
]
|
37
37
|
},
|
38
38
|
"metadata": {},
|
@@ -47,25 +47,25 @@
|
|
47
47
|
" </script>\n",
|
48
48
|
"\n",
|
49
49
|
"\n",
|
50
|
-
"<div id=\"
|
50
|
+
"<div id=\"64199817-8ce5-4721-8fea-ceaec7fa4a4e\" style=\"height: 100%; width: 100%;\"></div>\n",
|
51
51
|
"\n",
|
52
52
|
"<script>\n",
|
53
53
|
" require(['plotly'], function(Plotly) { \n",
|
54
54
|
"Plotly.newPlot(\n",
|
55
|
-
" '
|
56
|
-
" [{\"type\":\"table\",\"header\":{\"values\":[\"day_label\",\"display_time\",\"mark\",\"temps\",\"room_temp\",\"room_psychrometry\"]},\"cells\":{\"values\":[[1
|
57
|
-
" {
|
55
|
+
" '64199817-8ce5-4721-8fea-ceaec7fa4a4e',\n",
|
56
|
+
" [{\"type\":\"table\",\"header\":{\"values\":[\"day_label\",\"display_time\",\"mark\",\"temps\",\"room_temp\",\"room_psychrometry\"]},\"cells\":{\"values\":[[\"1\",\"1\",\"1\",\"2\",\"2\",\"2\",\"3\",\"3\"],[\"01/01 09:00\",\"01/01 10:00\",\"01/01 18:00\",\"01/02 06:00\",\"01/02 14:00\",\"01/02 20:00\",\"01/03 00:00\",\"01/03 05:00\"],[\"引込み\",\"床揉み\",\"切返し\",\"盛り\",\"仲仕事\",\"仕舞仕事\",\"最高積替\",\"出麹\"],[\"35.0\",\"32.0\",\"32.0, 31.0\",\"35.0, 33.0\",\"37.0, 35.0\",\"38.0, 37.0\",\"40.0\",\"40.0\"],[28.0,28.0,28.0,28.0,28.0,28.0,28.0,28.0],[\"\",\"\",\"\",4,4,5,5,5]]}}],\n",
|
57
|
+
" {},\n",
|
58
58
|
" {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
|
59
59
|
")\n",
|
60
60
|
"\n",
|
61
61
|
"window.addEventListener('resize', function() {\n",
|
62
|
-
" Plotly.Plots.resize(document.getElementById('
|
62
|
+
" Plotly.Plots.resize(document.getElementById('64199817-8ce5-4721-8fea-ceaec7fa4a4e'))\n",
|
63
63
|
"})\n",
|
64
64
|
" }) \n",
|
65
65
|
"</script>"
|
66
66
|
],
|
67
67
|
"text/plain": [
|
68
|
-
"#<Plotly::Offline::HTML:
|
68
|
+
"#<Plotly::Offline::HTML:0x00007fd3621e0680 @id=\"64199817-8ce5-4721-8fea-ceaec7fa4a4e\", @data=[{:type=>:table, :header=>{:values=>[:day_label, :display_time, :mark, :temps, :room_temp, :room_psychrometry]}, :cells=>{:values=>[[\"1\", \"1\", \"1\", \"2\", \"2\", \"2\", \"3\", \"3\"], [\"01/01 09:00\", \"01/01 10:00\", \"01/01 18:00\", \"01/02 06:00\", \"01/02 14:00\", \"01/02 20:00\", \"01/03 00:00\", \"01/03 05:00\"], [\"引込み\", \"床揉み\", \"切返し\", \"盛り\", \"仲仕事\", \"仕舞仕事\", \"最高積替\", \"出麹\"], [\"35.0\", \"32.0\", \"32.0, 31.0\", \"35.0, 33.0\", \"37.0, 35.0\", \"38.0, 37.0\", \"40.0\", \"40.0\"], [28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0, 28.0], [\"\", \"\", \"\", 4, 4, 5, 5, 5]]}}], @layout={}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
|
69
69
|
]
|
70
70
|
},
|
71
71
|
"metadata": {},
|
@@ -74,7 +74,7 @@
|
|
74
74
|
{
|
75
75
|
"data": {
|
76
76
|
"text/plain": [
|
77
|
-
"#<CZTop::Socket::PUB:
|
77
|
+
"#<CZTop::Socket::PUB:0x7fd36531a5d0 last_endpoint=\"tcp://127.0.0.1:53216\">"
|
78
78
|
]
|
79
79
|
},
|
80
80
|
"execution_count": 1,
|
@@ -85,10 +85,11 @@
|
|
85
85
|
"source": [
|
86
86
|
"$LOAD_PATH << File.dirname(__FILE__) + \"/../lib\"\n",
|
87
87
|
"require 'toji'\n",
|
88
|
+
"require './example_core'\n",
|
88
89
|
"require 'rbplotly'\n",
|
89
90
|
"\n",
|
90
|
-
"koji =
|
91
|
-
"koji.progress.plot.show\n",
|
91
|
+
"koji = Example::Brew::Koji.load_yaml_file(\"koji_making.yaml\")\n",
|
92
|
+
"koji.progress(enable_annotations: false).plot.show\n",
|
92
93
|
"koji.progress.table.show"
|
93
94
|
]
|
94
95
|
},
|
@@ -102,7 +103,7 @@
|
|
102
103
|
],
|
103
104
|
"metadata": {
|
104
105
|
"kernelspec": {
|
105
|
-
"display_name": "Ruby 2.7.
|
106
|
+
"display_name": "Ruby 2.7.1",
|
106
107
|
"language": "ruby",
|
107
108
|
"name": "ruby"
|
108
109
|
},
|