toji 1.6.8 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/example/calendar.ipynb +383 -0
  3. data/example/{schedule.yaml → calendar.yaml} +6 -30
  4. data/example/calendar_file.ipynb +338 -0
  5. data/example/example_core.rb +354 -0
  6. data/example/kake_ingredient.rb +26 -0
  7. data/example/{koji_recipe.rb → koji_ingredient.rb} +1 -2
  8. data/example/koji_making.ipynb +16 -15
  9. data/example/koji_making.rb +2 -1
  10. data/example/koji_making.yaml +10 -9
  11. data/example/koji_making_multi.ipynb +27 -61
  12. data/example/moromi.ipynb +25 -24
  13. data/example/moromi.rb +1 -0
  14. data/example/moromi.yaml +10 -4
  15. data/example/recipe.rb +75 -0
  16. data/example/shubo.ipynb +15 -14
  17. data/example/shubo.rb +2 -1
  18. data/example/shubo.yaml +12 -11
  19. data/lib/toji.rb +3 -1
  20. data/lib/toji/brew.rb +4 -3
  21. data/lib/toji/brew/base.rb +8 -92
  22. data/lib/toji/brew/builder.rb +77 -6
  23. data/lib/toji/brew/graph/bmd.rb +1 -2
  24. data/lib/toji/brew/graph/multi_progress.rb +0 -121
  25. data/lib/toji/brew/graph/progress.rb +17 -52
  26. data/lib/toji/brew/koji.rb +2 -11
  27. data/lib/toji/brew/moromi.rb +4 -37
  28. data/lib/toji/brew/shubo.rb +2 -6
  29. data/lib/toji/brew/state.rb +90 -103
  30. data/lib/toji/brew/wrapped_state.rb +136 -0
  31. data/lib/toji/calendar.rb +123 -0
  32. data/lib/toji/{schedule → calendar}/date_column.rb +3 -6
  33. data/lib/toji/{schedule → calendar}/date_row.rb +6 -6
  34. data/lib/toji/ingredient.rb +10 -0
  35. data/lib/toji/ingredient/kake.rb +17 -0
  36. data/lib/toji/ingredient/kake/actual.rb +26 -0
  37. data/lib/toji/ingredient/kake/base.rb +18 -0
  38. data/lib/toji/ingredient/kake/expected.rb +40 -0
  39. data/lib/toji/ingredient/koji.rb +19 -0
  40. data/lib/toji/ingredient/koji/actual.rb +29 -0
  41. data/lib/toji/ingredient/koji/actual_fermentable.rb +15 -0
  42. data/lib/toji/ingredient/koji/base.rb +35 -0
  43. data/lib/toji/ingredient/koji/expected.rb +45 -0
  44. data/lib/toji/ingredient/koji/expected_fermentable.rb +15 -0
  45. data/lib/toji/{recipe → ingredient}/koji_rate.rb +1 -1
  46. data/lib/toji/ingredient/rice.rb +10 -0
  47. data/lib/toji/ingredient/rice/actual_steamable.rb +27 -0
  48. data/lib/toji/ingredient/rice/base.rb +40 -0
  49. data/lib/toji/ingredient/rice/expected_steamable.rb +27 -0
  50. data/lib/toji/ingredient/rice_rate.rb +23 -0
  51. data/lib/toji/product.rb +65 -0
  52. data/lib/toji/{schedule/product_event.rb → product/event.rb} +4 -4
  53. data/lib/toji/recipe.rb +111 -5
  54. data/lib/toji/recipe/step.rb +49 -64
  55. data/lib/toji/version.rb +1 -1
  56. metadata +33 -39
  57. data/example/rice_recipe.rb +0 -28
  58. data/example/schedule.ipynb +0 -393
  59. data/example/schedule_file.ipynb +0 -337
  60. data/example/three_step_mashing_recipe.rb +0 -67
  61. data/lib/toji/brew/state_accessor.rb +0 -13
  62. data/lib/toji/brew/state_record.rb +0 -72
  63. data/lib/toji/recipe/ingredient.rb +0 -10
  64. data/lib/toji/recipe/ingredient/koji.rb +0 -21
  65. data/lib/toji/recipe/ingredient/koji/actual.rb +0 -32
  66. data/lib/toji/recipe/ingredient/koji/actual_fermentable.rb +0 -17
  67. data/lib/toji/recipe/ingredient/koji/base.rb +0 -37
  68. data/lib/toji/recipe/ingredient/koji/expected.rb +0 -48
  69. data/lib/toji/recipe/ingredient/koji/expected_fermentable.rb +0 -17
  70. data/lib/toji/recipe/ingredient/rice.rb +0 -21
  71. data/lib/toji/recipe/ingredient/rice/actual.rb +0 -29
  72. data/lib/toji/recipe/ingredient/rice/actual_steamable.rb +0 -29
  73. data/lib/toji/recipe/ingredient/rice/base.rb +0 -51
  74. data/lib/toji/recipe/ingredient/rice/expected.rb +0 -43
  75. data/lib/toji/recipe/ingredient/rice/expected_steamable.rb +0 -31
  76. data/lib/toji/recipe/ingredient/yeast.rb +0 -21
  77. data/lib/toji/recipe/rice_rate.rb +0 -10
  78. data/lib/toji/recipe/rice_rate/base.rb +0 -21
  79. data/lib/toji/recipe/rice_rate/cooked.rb +0 -67
  80. data/lib/toji/recipe/rice_rate/steamed.rb +0 -30
  81. data/lib/toji/recipe/three_step_mashing.rb +0 -274
  82. data/lib/toji/recipe/yeast_rate.rb +0 -41
  83. data/lib/toji/schedule.rb +0 -11
  84. data/lib/toji/schedule/calendar.rb +0 -139
  85. data/lib/toji/schedule/date_interval_enumerator.rb +0 -45
  86. data/lib/toji/schedule/product.rb +0 -117
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8cb7b9d1041efe57106054ed9e49f2d521550ab9f81a3de9be8433ff7f672926
4
- data.tar.gz: 77297b7cba2845e1e470e37ddbb70db62cd71c8fc0afd5505e152249fe98d029
3
+ metadata.gz: ec68ce9ca3d8e0b3414b7e5bc2407acd0c921dded8e2c81d803d7113faf16377
4
+ data.tar.gz: a87f5732226f22c2ffde9f1dd0390d33f4cbc82f6123a6dce317561e25933e18
5
5
  SHA512:
6
- metadata.gz: d5f87b0a0fb8d9ca5bc066c8790cee02d0f12bb12fd10b9ca2ca57f87b8749e2c4650a718ce244caccbd297b0f3ea4b81436db17ab83454032e6149afa7548f5
7
- data.tar.gz: f877c7e824aa82285bcc93de1e7b9c88bef392c505fb6ab49ba4435b38329946298420ead7a207fdfb938fa4d7a9d438ec852d52f202895208997b039eed4520
6
+ metadata.gz: 47a3a740eed016bf412dec866c68a4b64ca6ad026373a37c504993ea79912739b399691d13148b372d290adb00664c4a3e546b2b52be05f6c6d39fa3399bfaa0
7
+ data.tar.gz: 773cf147acf53eb4f3954d766c6d6f316a49b7614d58cb10d1214d5d6c20bd3d5f98418c46e5fdfa3666d0d3af43ea6e08a640a41d0937d19bf7cb888d87af87
@@ -0,0 +1,383 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 1,
6
+ "metadata": {
7
+ "scrolled": false
8
+ },
9
+ "outputs": [
10
+ {
11
+ "name": "stdout",
12
+ "output_type": "stream",
13
+ "text": [
14
+ "仕1 姫野国夫による酒母省略仕込\n"
15
+ ]
16
+ },
17
+ {
18
+ "data": {
19
+ "text/html": [
20
+ "\n",
21
+ " <script>\n",
22
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
23
+ " </script>\n",
24
+ "\n",
25
+ "\n",
26
+ "<div id=\"b9238107-3122-4821-bab8-cb6878bdb3a5\" style=\"height: 100%; width: 100%;\"></div>\n",
27
+ "\n",
28
+ "<script>\n",
29
+ " require(['plotly'], function(Plotly) { \n",
30
+ "Plotly.newPlot(\n",
31
+ " 'b9238107-3122-4821-bab8-cb6878bdb3a5',\n",
32
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"\",\"moto\",\"soe\",\"naka\",\"tome\",\"yodan\",\"total\"]},\"cells\":{\"values\":[[\"rice_total\",\"kake\",\"koji\",\"alcohol\",\"water\",\"lactic_acid\"],[35.0,\"\",35,\"\",123,0.8],[65.0,65,\"\",\"\",\"\",\"\"],[200.0,150,50,\"\",200,\"\"],[300.0,245,55,\"\",400,\"\"],[\"\",\"\",\"\",\"\",128,\"\"],[600.0,460,140,\"\",851,0.8]]}}],\n",
33
+ " {\"height\":350},\n",
34
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
35
+ ")\n",
36
+ "\n",
37
+ "window.addEventListener('resize', function() {\n",
38
+ " Plotly.Plots.resize(document.getElementById('b9238107-3122-4821-bab8-cb6878bdb3a5'))\n",
39
+ "})\n",
40
+ " }) \n",
41
+ "</script>"
42
+ ],
43
+ "text/plain": [
44
+ "#<Plotly::Offline::HTML:0x00007fe78019af18 @id=\"b9238107-3122-4821-bab8-cb6878bdb3a5\", @data=[{:type=>:table, :header=>{:values=>[\"\", :moto, :soe, :naka, :tome, :yodan, :total]}, :cells=>{:values=>[[:rice_total, :kake, :koji, :alcohol, :water, :lactic_acid], [35.0, \"\", 35, \"\", 123, 0.8], [65.0, 65, \"\", \"\", \"\", \"\"], [200.0, 150, 50, \"\", 200, \"\"], [300.0, 245, 55, \"\", 400, \"\"], [\"\", \"\", \"\", \"\", 128, \"\"], [600.0, 460, 140, \"\", 851, 0.8]]}}], @layout={:height=>350}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
45
+ ]
46
+ },
47
+ "metadata": {},
48
+ "output_type": "display_data"
49
+ },
50
+ {
51
+ "name": "stdout",
52
+ "output_type": "stream",
53
+ "text": [
54
+ "仕2 姫野国夫による酒母省略仕込\n"
55
+ ]
56
+ },
57
+ {
58
+ "data": {
59
+ "text/html": [
60
+ "\n",
61
+ " <script>\n",
62
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
63
+ " </script>\n",
64
+ "\n",
65
+ "\n",
66
+ "<div id=\"e5a942fd-2bcc-45ae-80ab-7b8babd60220\" style=\"height: 100%; width: 100%;\"></div>\n",
67
+ "\n",
68
+ "<script>\n",
69
+ " require(['plotly'], function(Plotly) { \n",
70
+ "Plotly.newPlot(\n",
71
+ " 'e5a942fd-2bcc-45ae-80ab-7b8babd60220',\n",
72
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"\",\"moto\",\"soe\",\"naka\",\"tome\",\"yodan\",\"total\"]},\"cells\":{\"values\":[[\"rice_total\",\"kake\",\"koji\",\"alcohol\",\"water\",\"lactic_acid\"],[32.0,\"\",32,\"\",112,0.733],[60.0,60,\"\",\"\",\"\",\"\"],[184.0,138,46,\"\",183,\"\"],[275.0,225,50,\"\",367,\"\"],[\"\",\"\",\"\",\"\",117,\"\"],[551.0,423,128,\"\",779,0.733]]}}],\n",
73
+ " {\"height\":350},\n",
74
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
75
+ ")\n",
76
+ "\n",
77
+ "window.addEventListener('resize', function() {\n",
78
+ " Plotly.Plots.resize(document.getElementById('e5a942fd-2bcc-45ae-80ab-7b8babd60220'))\n",
79
+ "})\n",
80
+ " }) \n",
81
+ "</script>"
82
+ ],
83
+ "text/plain": [
84
+ "#<Plotly::Offline::HTML:0x00007fe7808a6578 @id=\"e5a942fd-2bcc-45ae-80ab-7b8babd60220\", @data=[{:type=>:table, :header=>{:values=>[\"\", :moto, :soe, :naka, :tome, :yodan, :total]}, :cells=>{:values=>[[:rice_total, :kake, :koji, :alcohol, :water, :lactic_acid], [32.0, \"\", 32, \"\", 112, 0.733], [60.0, 60, \"\", \"\", \"\", \"\"], [184.0, 138, 46, \"\", 183, \"\"], [275.0, 225, 50, \"\", 367, \"\"], [\"\", \"\", \"\", \"\", 117, \"\"], [551.0, 423, 128, \"\", 779, 0.733]]}}], @layout={:height=>350}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
85
+ ]
86
+ },
87
+ "metadata": {},
88
+ "output_type": "display_data"
89
+ },
90
+ {
91
+ "name": "stdout",
92
+ "output_type": "stream",
93
+ "text": [
94
+ "仕3 灘における仕込配合\n"
95
+ ]
96
+ },
97
+ {
98
+ "data": {
99
+ "text/html": [
100
+ "\n",
101
+ " <script>\n",
102
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
103
+ " </script>\n",
104
+ "\n",
105
+ "\n",
106
+ "<div id=\"39c22eaa-9067-4305-bfae-1622055cfcb5\" style=\"height: 100%; width: 100%;\"></div>\n",
107
+ "\n",
108
+ "<script>\n",
109
+ " require(['plotly'], function(Plotly) { \n",
110
+ "Plotly.newPlot(\n",
111
+ " '39c22eaa-9067-4305-bfae-1622055cfcb5',\n",
112
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"\",\"moto\",\"soe\",\"naka\",\"tome\",\"alcohol\",\"total\"]},\"cells\":{\"values\":[[\"rice_total\",\"kake\",\"koji\",\"alcohol\",\"water\",\"lactic_acid\"],[63.0,42,21,\"\",77,0.524],[143.0,98,45,\"\",122,\"\"],[254.0,190,64,\"\",302,\"\"],[440.0,366,74,\"\",599,\"\"],[\"\",\"\",\"\",405,\"\",\"\"],[900.0,696,204,405,1100,0.524]]}}],\n",
113
+ " {\"height\":350},\n",
114
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
115
+ ")\n",
116
+ "\n",
117
+ "window.addEventListener('resize', function() {\n",
118
+ " Plotly.Plots.resize(document.getElementById('39c22eaa-9067-4305-bfae-1622055cfcb5'))\n",
119
+ "})\n",
120
+ " }) \n",
121
+ "</script>"
122
+ ],
123
+ "text/plain": [
124
+ "#<Plotly::Offline::HTML:0x00007fe780248438 @id=\"39c22eaa-9067-4305-bfae-1622055cfcb5\", @data=[{:type=>:table, :header=>{:values=>[\"\", :moto, :soe, :naka, :tome, :alcohol, :total]}, :cells=>{:values=>[[:rice_total, :kake, :koji, :alcohol, :water, :lactic_acid], [63.0, 42, 21, \"\", 77, 0.524], [143.0, 98, 45, \"\", 122, \"\"], [254.0, 190, 64, \"\", 302, \"\"], [440.0, 366, 74, \"\", 599, \"\"], [\"\", \"\", \"\", 405, \"\", \"\"], [900.0, 696, 204, 405, 1100, 0.524]]}}], @layout={:height=>350}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
125
+ ]
126
+ },
127
+ "metadata": {},
128
+ "output_type": "display_data"
129
+ },
130
+ {
131
+ "name": "stdout",
132
+ "output_type": "stream",
133
+ "text": [
134
+ "仕4 酒造教本による標準型仕込配合\n"
135
+ ]
136
+ },
137
+ {
138
+ "data": {
139
+ "text/html": [
140
+ "\n",
141
+ " <script>\n",
142
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
143
+ " </script>\n",
144
+ "\n",
145
+ "\n",
146
+ "<div id=\"53486795-5906-47d5-b014-a77e2a251c5e\" style=\"height: 100%; width: 100%;\"></div>\n",
147
+ "\n",
148
+ "<script>\n",
149
+ " require(['plotly'], function(Plotly) { \n",
150
+ "Plotly.newPlot(\n",
151
+ " '53486795-5906-47d5-b014-a77e2a251c5e',\n",
152
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"\",\"moto\",\"soe\",\"naka\",\"tome\",\"yodan\",\"total\"]},\"cells\":{\"values\":[[\"rice_total\",\"kake\",\"koji\",\"alcohol\",\"water\",\"lactic_acid\"],[59.0,41,18,\"\",63,0.432],[126.0,90,36,\"\",117,\"\"],[248.0,194,54,\"\",297,\"\"],[396.0,324,72,\"\",567,\"\"],[72.0,72,\"\",\"\",108,\"\"],[901.0,721,180,\"\",1152,0.432]]}}],\n",
153
+ " {\"height\":350},\n",
154
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
155
+ ")\n",
156
+ "\n",
157
+ "window.addEventListener('resize', function() {\n",
158
+ " Plotly.Plots.resize(document.getElementById('53486795-5906-47d5-b014-a77e2a251c5e'))\n",
159
+ "})\n",
160
+ " }) \n",
161
+ "</script>"
162
+ ],
163
+ "text/plain": [
164
+ "#<Plotly::Offline::HTML:0x00007fe7802ca9b0 @id=\"53486795-5906-47d5-b014-a77e2a251c5e\", @data=[{:type=>:table, :header=>{:values=>[\"\", :moto, :soe, :naka, :tome, :yodan, :total]}, :cells=>{:values=>[[:rice_total, :kake, :koji, :alcohol, :water, :lactic_acid], [59.0, 41, 18, \"\", 63, 0.432], [126.0, 90, 36, \"\", 117, \"\"], [248.0, 194, 54, \"\", 297, \"\"], [396.0, 324, 72, \"\", 567, \"\"], [72.0, 72, \"\", \"\", 108, \"\"], [901.0, 721, 180, \"\", 1152, 0.432]]}}], @layout={:height=>350}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
165
+ ]
166
+ },
167
+ "metadata": {},
168
+ "output_type": "display_data"
169
+ },
170
+ {
171
+ "name": "stdout",
172
+ "output_type": "stream",
173
+ "text": [
174
+ "仕5 灘における仕込配合\n"
175
+ ]
176
+ },
177
+ {
178
+ "data": {
179
+ "text/html": [
180
+ "\n",
181
+ " <script>\n",
182
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
183
+ " </script>\n",
184
+ "\n",
185
+ "\n",
186
+ "<div id=\"a170cc63-db5c-4c42-87a0-2ebfaec023c9\" style=\"height: 100%; width: 100%;\"></div>\n",
187
+ "\n",
188
+ "<script>\n",
189
+ " require(['plotly'], function(Plotly) { \n",
190
+ "Plotly.newPlot(\n",
191
+ " 'a170cc63-db5c-4c42-87a0-2ebfaec023c9',\n",
192
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"\",\"moto\",\"soe\",\"naka\",\"tome\",\"alcohol\",\"total\"]},\"cells\":{\"values\":[[\"rice_total\",\"kake\",\"koji\",\"alcohol\",\"water\",\"lactic_acid\"],[63.0,42,21,\"\",77,0.524],[143.0,98,45,\"\",122,\"\"],[254.0,190,64,\"\",302,\"\"],[440.0,366,74,\"\",599,\"\"],[\"\",\"\",\"\",405,\"\",\"\"],[900.0,696,204,405,1100,0.524]]}}],\n",
193
+ " {\"height\":350},\n",
194
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
195
+ ")\n",
196
+ "\n",
197
+ "window.addEventListener('resize', function() {\n",
198
+ " Plotly.Plots.resize(document.getElementById('a170cc63-db5c-4c42-87a0-2ebfaec023c9'))\n",
199
+ "})\n",
200
+ " }) \n",
201
+ "</script>"
202
+ ],
203
+ "text/plain": [
204
+ "#<Plotly::Offline::HTML:0x00007fe78210e1b0 @id=\"a170cc63-db5c-4c42-87a0-2ebfaec023c9\", @data=[{:type=>:table, :header=>{:values=>[\"\", :moto, :soe, :naka, :tome, :alcohol, :total]}, :cells=>{:values=>[[:rice_total, :kake, :koji, :alcohol, :water, :lactic_acid], [63.0, 42, 21, \"\", 77, 0.524], [143.0, 98, 45, \"\", 122, \"\"], [254.0, 190, 64, \"\", 302, \"\"], [440.0, 366, 74, \"\", 599, \"\"], [\"\", \"\", \"\", 405, \"\", \"\"], [900.0, 696, 204, 405, 1100, 0.524]]}}], @layout={:height=>350}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
205
+ ]
206
+ },
207
+ "metadata": {},
208
+ "output_type": "display_data"
209
+ },
210
+ {
211
+ "name": "stdout",
212
+ "output_type": "stream",
213
+ "text": [
214
+ "仕6 酒造教本による標準型仕込配合\n"
215
+ ]
216
+ },
217
+ {
218
+ "data": {
219
+ "text/html": [
220
+ "\n",
221
+ " <script>\n",
222
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
223
+ " </script>\n",
224
+ "\n",
225
+ "\n",
226
+ "<div id=\"b4b70c54-a4d9-4ec1-ad53-89b145a40cfe\" style=\"height: 100%; width: 100%;\"></div>\n",
227
+ "\n",
228
+ "<script>\n",
229
+ " require(['plotly'], function(Plotly) { \n",
230
+ "Plotly.newPlot(\n",
231
+ " 'b4b70c54-a4d9-4ec1-ad53-89b145a40cfe',\n",
232
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"\",\"moto\",\"soe\",\"naka\",\"tome\",\"yodan\",\"total\"]},\"cells\":{\"values\":[[\"rice_total\",\"kake\",\"koji\",\"alcohol\",\"water\",\"lactic_acid\"],[59.0,41,18,\"\",63,0.432],[126.0,90,36,\"\",117,\"\"],[248.0,194,54,\"\",297,\"\"],[396.0,324,72,\"\",567,\"\"],[72.0,72,\"\",\"\",108,\"\"],[901.0,721,180,\"\",1152,0.432]]}}],\n",
233
+ " {\"height\":350},\n",
234
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
235
+ ")\n",
236
+ "\n",
237
+ "window.addEventListener('resize', function() {\n",
238
+ " Plotly.Plots.resize(document.getElementById('b4b70c54-a4d9-4ec1-ad53-89b145a40cfe'))\n",
239
+ "})\n",
240
+ " }) \n",
241
+ "</script>"
242
+ ],
243
+ "text/plain": [
244
+ "#<Plotly::Offline::HTML:0x00007fe7808aedb8 @id=\"b4b70c54-a4d9-4ec1-ad53-89b145a40cfe\", @data=[{:type=>:table, :header=>{:values=>[\"\", :moto, :soe, :naka, :tome, :yodan, :total]}, :cells=>{:values=>[[:rice_total, :kake, :koji, :alcohol, :water, :lactic_acid], [59.0, 41, 18, \"\", 63, 0.432], [126.0, 90, 36, \"\", 117, \"\"], [248.0, 194, 54, \"\", 297, \"\"], [396.0, 324, 72, \"\", 567, \"\"], [72.0, 72, \"\", \"\", 108, \"\"], [901.0, 721, 180, \"\", 1152, 0.432]]}}], @layout={:height=>350}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
245
+ ]
246
+ },
247
+ "metadata": {},
248
+ "output_type": "display_data"
249
+ },
250
+ {
251
+ "data": {
252
+ "text/html": [
253
+ "\n",
254
+ " <script>\n",
255
+ " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
256
+ " </script>\n",
257
+ "\n",
258
+ "\n",
259
+ "<div id=\"3562664a-c92f-463c-8291-fea55ccee080\" style=\"height: 100%; width: 100%;\"></div>\n",
260
+ "\n",
261
+ "<script>\n",
262
+ " require(['plotly'], function(Plotly) { \n",
263
+ "Plotly.newPlot(\n",
264
+ " '3562664a-c92f-463c-8291-fea55ccee080',\n",
265
+ " [{\"type\":\"table\",\"header\":{\"values\":[\"date\",\"moto_koji\",\"moromi_koji\",\"moto\",\"soe\",\"naka\",\"tome\",\"yodan\"]},\"cells\":{\"values\":[[\"02/20\",\"02/21\",\"02/22\",\"02/23\",\"02/24\",\"02/25\",\"02/26\",\"02/27\",\"02/28\",\"02/29\",\"03/01\",\"03/02\",\"03/03\",\"03/04\",\"03/05\",\"03/06\",\"03/07\",\"03/08\",\"03/09\",\"03/10\",\"03/11\",\"03/12\",\"03/13\",\"03/14\",\"03/15\",\"03/16\",\"03/17\",\"03/18\",\"03/19\",\"03/20\",\"03/21\",\"03/22\",\"03/23\",\"03/24\",\"03/25\",\"03/26\",\"03/27\",\"03/28\",\"03/29\",\"03/30\",\"03/31\",\"04/01\",\"04/02\",\"04/03\",\"04/04\",\"04/05\",\"04/06\",\"04/07\",\"04/08\",\"04/09\",\"04/10\",\"04/11\",\"04/12\",\"04/13\",\"04/14\",\"04/15\"],[\"仕3: 21\\u003cbr\\u003e仕4: 18\",\"\",\"\",\"\",\"\",\"\",\"\",\"仕5: 21\\u003cbr\\u003e仕6: 18\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],[\"\",\"\",\"\",\"\",\"仕1: 140\",\"\",\"\",\"仕2: 128\",\"\",\"\",\"\",\"仕3: 183\",\"\",\"\",\"仕4: 162\",\"\",\"\",\"\",\"仕5: 183\",\"\",\"\",\"仕6: 162\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],[\"\",\"\",\"\",\"\",\"\",\"仕3: 42\\u003cbr\\u003e仕4: 41\",\"\",\"\",\"\",\"\",\"仕1: 0\",\"\",\"仕2: 0\\u003cbr\\u003e仕5: 42\\u003cbr\\u003e仕6: 41\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"仕1: 65\",\"\",\"仕2: 60\",\"\",\"\",\"\",\"\",\"仕3: 98\",\"\",\"仕4: 90\",\"\",\"\",\"\",\"\",\"仕5: 98\",\"\",\"仕6: 90\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"仕1: 150\",\"\",\"\",\"仕2: 138\",\"\",\"\",\"\",\"仕3: 190\",\"\",\"仕4: 194\",\"\",\"\",\"\",\"\",\"仕5: 190\",\"\",\"仕6: 194\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"仕1: 245\",\"\",\"\",\"仕2: 225\",\"\",\"\",\"\",\"仕3: 366\",\"\",\"仕4: 324\",\"\",\"\",\"\",\"\",\"仕5: 366\",\"\",\"仕6: 324\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"],[\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"仕4: 72\",\"\",\"\",\"\",\"\",\"\",\"\",\"仕6: 72\"]]}}],\n",
266
+ " {\"height\":1000},\n",
267
+ " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
268
+ ")\n",
269
+ "\n",
270
+ "window.addEventListener('resize', function() {\n",
271
+ " Plotly.Plots.resize(document.getElementById('3562664a-c92f-463c-8291-fea55ccee080'))\n",
272
+ "})\n",
273
+ " }) \n",
274
+ "</script>"
275
+ ],
276
+ "text/plain": [
277
+ "#<Plotly::Offline::HTML:0x00007fe7821aab28 @id=\"3562664a-c92f-463c-8291-fea55ccee080\", @data=[{:type=>:table, :header=>{:values=>[:date, :moto_koji, :moromi_koji, :moto, :soe, :naka, :tome, :yodan]}, :cells=>{:values=>[[\"02/20\", \"02/21\", \"02/22\", \"02/23\", \"02/24\", \"02/25\", \"02/26\", \"02/27\", \"02/28\", \"02/29\", \"03/01\", \"03/02\", \"03/03\", \"03/04\", \"03/05\", \"03/06\", \"03/07\", \"03/08\", \"03/09\", \"03/10\", \"03/11\", \"03/12\", \"03/13\", \"03/14\", \"03/15\", \"03/16\", \"03/17\", \"03/18\", \"03/19\", \"03/20\", \"03/21\", \"03/22\", \"03/23\", \"03/24\", \"03/25\", \"03/26\", \"03/27\", \"03/28\", \"03/29\", \"03/30\", \"03/31\", \"04/01\", \"04/02\", \"04/03\", \"04/04\", \"04/05\", \"04/06\", \"04/07\", \"04/08\", \"04/09\", \"04/10\", \"04/11\", \"04/12\", \"04/13\", \"04/14\", \"04/15\"], [\"仕3: 21<br>仕4: 18\", \"\", \"\", \"\", \"\", \"\", \"\", \"仕5: 21<br>仕6: 18\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], [\"\", \"\", \"\", \"\", \"仕1: 140\", \"\", \"\", \"仕2: 128\", \"\", \"\", \"\", \"仕3: 183\", \"\", \"\", \"仕4: 162\", \"\", \"\", \"\", \"仕5: 183\", \"\", \"\", \"仕6: 162\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], [\"\", \"\", \"\", \"\", \"\", \"仕3: 42<br>仕4: 41\", \"\", \"\", \"\", \"\", \"仕1: 0\", \"\", \"仕2: 0<br>仕5: 42<br>仕6: 41\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"仕1: 65\", \"\", \"仕2: 60\", \"\", \"\", \"\", \"\", \"仕3: 98\", \"\", \"仕4: 90\", \"\", \"\", \"\", \"\", \"仕5: 98\", \"\", \"仕6: 90\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"仕1: 150\", \"\", \"\", \"仕2: 138\", \"\", \"\", \"\", \"仕3: 190\", \"\", \"仕4: 194\", \"\", \"\", \"\", \"\", \"仕5: 190\", \"\", \"仕6: 194\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"仕1: 245\", \"\", \"\", \"仕2: 225\", \"\", \"\", \"\", \"仕3: 366\", \"\", \"仕4: 324\", \"\", \"\", \"\", \"\", \"仕5: 366\", \"\", \"仕6: 324\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"], [\"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"仕4: 72\", \"\", \"\", \"\", \"\", \"\", \"\", \"仕6: 72\"]]}}], @layout={:height=>1000}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
278
+ ]
279
+ },
280
+ "metadata": {},
281
+ "output_type": "display_data"
282
+ },
283
+ {
284
+ "data": {
285
+ "text/plain": [
286
+ "#<CZTop::Socket::PUB:0x7fe781e2cc90 last_endpoint=\"tcp://127.0.0.1:57851\">"
287
+ ]
288
+ },
289
+ "execution_count": 1,
290
+ "metadata": {},
291
+ "output_type": "execute_result"
292
+ }
293
+ ],
294
+ "source": [
295
+ "$LOAD_PATH << File.dirname(__FILE__) + \"/../lib\"\n",
296
+ "require 'toji'\n",
297
+ "require './example_core'\n",
298
+ "require 'rbplotly'\n",
299
+ "\n",
300
+ "cal = Toji::Calendar.new\n",
301
+ ".add(Example::Product.create(\n",
302
+ " name: \"仕1\",\n",
303
+ " description: \"姫野国夫による酒母省略仕込\",\n",
304
+ " recipe: Example::Recipe::TEMPLATES[:simple_sokujo_himeno].scale(600).round(0),\n",
305
+ " start_date: Time.mktime(2020, 2, 24)\n",
306
+ "))\n",
307
+ ".add(Example::Product.create(\n",
308
+ " name: \"仕2\",\n",
309
+ " description: \"姫野国夫による酒母省略仕込\",\n",
310
+ " recipe: Example::Recipe::TEMPLATES[:simple_sokujo_himeno].scale(550).round(0).tap {|r|\n",
311
+ " r.steps[0].kake_interval_days = 5\n",
312
+ " r.steps[2].kake_interval_days = 3\n",
313
+ " },\n",
314
+ " start_date: Time.mktime(2020, 2, 27)\n",
315
+ "))\n",
316
+ ".add(Example::Product.create(\n",
317
+ " name: \"仕3\",\n",
318
+ " description: \"灘における仕込配合\",\n",
319
+ " recipe: Example::Recipe::TEMPLATES[:sokujo_nada].scale(900).round(0).tap {|r|\n",
320
+ " r.steps[1].koji_interval_days = 11\n",
321
+ " r.steps[1].kake_interval_days = 13\n",
322
+ " },\n",
323
+ " start_date: Time.mktime(2020, 2, 20)\n",
324
+ "))\n",
325
+ ".add(Example::Product.create(\n",
326
+ " name: \"仕4\",\n",
327
+ " description: \"酒造教本による標準型仕込配合\",\n",
328
+ " recipe: Example::Recipe::TEMPLATES[:sokujo_textbook].scale(900).round(0),\n",
329
+ " start_date: Time.mktime(2020, 2, 20)\n",
330
+ "))\n",
331
+ ".add(Example::Product.create(\n",
332
+ " name: \"仕5\",\n",
333
+ " description: \"灘における仕込配合\",\n",
334
+ " recipe: Example::Recipe::TEMPLATES[:sokujo_nada].scale(900).round(0).tap {|r|\n",
335
+ " r.steps[1].koji_interval_days = 11\n",
336
+ " r.steps[1].kake_interval_days = 13\n",
337
+ " },\n",
338
+ " start_date: Time.mktime(2020, 2, 27)\n",
339
+ "))\n",
340
+ ".add(Example::Product.create(\n",
341
+ " name: \"仕6\",\n",
342
+ " description: \"酒造教本による標準型仕込配合\",\n",
343
+ " recipe: Example::Recipe::TEMPLATES[:sokujo_textbook].scale(900).round(0),\n",
344
+ " start_date: Time.mktime(2020, 2, 27)\n",
345
+ "))\n",
346
+ "\n",
347
+ "cal.products.each {|product|\n",
348
+ " puts \"%s %s\" % [product.name, product.description]\n",
349
+ " \n",
350
+ " product.recipe.table.tap {|t|\n",
351
+ " t.layout.height = 350\n",
352
+ " }.show\n",
353
+ "}\n",
354
+ "\n",
355
+ "cal.table.tap {|t|\n",
356
+ " t.layout.height = 1000\n",
357
+ "}.show"
358
+ ]
359
+ },
360
+ {
361
+ "cell_type": "code",
362
+ "execution_count": null,
363
+ "metadata": {},
364
+ "outputs": [],
365
+ "source": []
366
+ }
367
+ ],
368
+ "metadata": {
369
+ "kernelspec": {
370
+ "display_name": "Ruby 2.7.1",
371
+ "language": "ruby",
372
+ "name": "ruby"
373
+ },
374
+ "language_info": {
375
+ "file_extension": ".rb",
376
+ "mimetype": "application/x-ruby",
377
+ "name": "ruby",
378
+ "version": "2.6.3"
379
+ }
380
+ },
381
+ "nbformat": 4,
382
+ "nbformat_minor": 2
383
+ }
@@ -4,58 +4,34 @@ products:
4
4
  recipe: :simple_sokujo_himeno
5
5
  scale: 600
6
6
  round: 0
7
- koji_dates: 2020-2-24
8
- rice_dates: 2020-3-1
9
- moto_days: 1
10
- odori_days: 1
7
+ start_date: 2020-2-24
11
8
  - name: 仕2
12
9
  description: 姫野国夫による酒母省略仕込
13
10
  recipe: :simple_sokujo_himeno
14
11
  scale: 550
15
12
  round: 0
16
- koji_dates: 2020-2-27
17
- rice_dates: 2020-3-3
13
+ start_date: 2020-2-27
18
14
  - name: 仕3
19
15
  description: 灘における仕込配合
20
16
  recipe: :sokujo_nada
21
17
  scale: 900
22
18
  round: 0
23
- koji_dates:
24
- - 2020-2-20
25
- - 2020-3-2
26
- rice_dates:
27
- - 2020-2-25
28
- - 2020-3-9
19
+ start_date: 2020-2-20
29
20
  - name: 仕4
30
21
  description: 酒造教本による標準型仕込配合
31
22
  recipe: :sokujo_textbook
32
23
  scale: 900
33
24
  round: 0
34
- koji_dates:
35
- - 2020-2-20
36
- - 2020-3-5
37
- rice_dates:
38
- - 2020-2-25
39
- - 2020-3-11
25
+ start_date: 2020-2-20
40
26
  - name: 仕5
41
27
  description: 灘における仕込配合
42
28
  recipe: :sokujo_nada
43
29
  scale: 900
44
30
  round: 0
45
- koji_dates:
46
- - 2020-2-27
47
- - 2020-3-9
48
- rice_dates:
49
- - 2020-3-3
50
- - 2020-3-16
31
+ start_date: 2020-2-27
51
32
  - name: 仕6
52
33
  description: 酒造教本による標準型仕込配合
53
34
  recipe: :sokujo_textbook
54
35
  scale: 900
55
36
  round: 0
56
- koji_dates:
57
- - 2020-2-27
58
- - 2020-3-12
59
- rice_dates:
60
- - 2020-3-3
61
- - 2020-3-18
37
+ start_date: 2020-2-27