toji 2.8.0 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/example/calendar.ipynb +42 -51
  3. data/example/calendar.yaml +6 -6
  4. data/example/calendar_file.ipynb +36 -36
  5. data/example/example_core.rb +877 -205
  6. data/example/kake_ingredient.rb +21 -15
  7. data/example/koji_ingredient.rb +31 -21
  8. data/example/{koji_making.ipynb → koji_progress.ipynb} +14 -14
  9. data/example/{koji_making.rb → koji_progress.rb} +3 -2
  10. data/example/{koji_making.yaml → koji_progress.yaml} +8 -9
  11. data/example/{koji_making_multi.ipynb → koji_progress_multi.ipynb} +21 -22
  12. data/example/{moromi.ipynb → moromi_progress.ipynb} +22 -22
  13. data/example/{moromi.rb → moromi_progress.rb} +3 -2
  14. data/example/{moromi.yaml → moromi_progress.yaml} +0 -0
  15. data/example/moto_progress.ipynb +121 -0
  16. data/example/{moto.rb → moto_progress.rb} +3 -2
  17. data/example/{moto.yaml → moto_progress.yaml} +14 -15
  18. data/example/recipe.rb +44 -32
  19. data/lib/toji.rb +4 -1
  20. data/lib/toji/calendar.rb +18 -18
  21. data/lib/toji/calendar/date_column.rb +7 -22
  22. data/lib/toji/calendar/date_row.rb +6 -6
  23. data/lib/toji/ingredient.rb +6 -2
  24. data/lib/toji/ingredient/alcohol.rb +14 -0
  25. data/lib/toji/ingredient/base.rb +11 -0
  26. data/lib/toji/ingredient/kake.rb +3 -9
  27. data/lib/toji/ingredient/koji.rb +19 -10
  28. data/lib/toji/ingredient/lactic_acid.rb +14 -0
  29. data/lib/toji/ingredient/rice.rb +50 -4
  30. data/lib/toji/ingredient/tanekoji.rb +29 -0
  31. data/lib/toji/ingredient/water.rb +18 -0
  32. data/lib/toji/ingredient/yeast.rb +20 -0
  33. data/lib/toji/processing.rb +18 -0
  34. data/lib/toji/processing/base.rb +7 -0
  35. data/lib/toji/processing/cooled_rice.rb +22 -0
  36. data/lib/toji/processing/cooled_rice_element.rb +8 -0
  37. data/lib/toji/processing/dekoji.rb +22 -0
  38. data/lib/toji/processing/dekoji_element.rb +8 -0
  39. data/lib/toji/processing/kake_processing.rb +7 -0
  40. data/lib/toji/processing/koji_processing.rb +10 -0
  41. data/lib/toji/processing/rice_processing.rb +19 -0
  42. data/lib/toji/processing/soaked_rice.rb +49 -0
  43. data/lib/toji/processing/soaked_rice_element.rb +18 -0
  44. data/lib/toji/processing/steamed_rice.rb +22 -0
  45. data/lib/toji/processing/steamed_rice_element.rb +8 -0
  46. data/lib/toji/product.rb +11 -83
  47. data/lib/toji/product/schedule_factory.rb +74 -0
  48. data/lib/toji/progress.rb +23 -0
  49. data/lib/toji/progress/base_progress.rb +37 -0
  50. data/lib/toji/progress/base_state.rb +39 -0
  51. data/lib/toji/progress/builder.rb +53 -0
  52. data/lib/toji/progress/graph.rb +11 -0
  53. data/lib/toji/{brew → progress}/graph/ab.rb +4 -4
  54. data/lib/toji/{brew → progress}/graph/bmd.rb +2 -2
  55. data/lib/toji/{brew/graph/multi_progress.rb → progress/graph/multi_progress_note.rb} +11 -11
  56. data/lib/toji/{brew/graph/progress.rb → progress/graph/progress_note.rb} +20 -18
  57. data/lib/toji/progress/koji_progress.rb +15 -0
  58. data/lib/toji/progress/koji_state.rb +23 -0
  59. data/lib/toji/{brew/moromi.rb → progress/moromi_progress.rb} +9 -5
  60. data/lib/toji/progress/moromi_state.rb +77 -0
  61. data/lib/toji/progress/moto_progress.rb +15 -0
  62. data/lib/toji/progress/moto_state.rb +31 -0
  63. data/lib/toji/progress/progress.rb +15 -0
  64. data/lib/toji/progress/state.rb +9 -0
  65. data/lib/toji/progress/state/baume_to_nihonshudo.rb +21 -0
  66. data/lib/toji/progress/state/nihonshudo_to_baume.rb +21 -0
  67. data/lib/toji/recipe.rb +54 -39
  68. data/lib/toji/recipe/ab_expect.rb +2 -2
  69. data/lib/toji/recipe/action.rb +8 -0
  70. data/lib/toji/recipe/step.rb +97 -71
  71. data/lib/toji/schedule.rb +5 -0
  72. data/lib/toji/schedule/action_schedule.rb +9 -0
  73. data/lib/toji/schedule/base.rb +9 -0
  74. data/lib/toji/schedule/kake_schedule.rb +11 -0
  75. data/lib/toji/schedule/koji_schedule.rb +11 -0
  76. data/lib/toji/schedule/rice_schedule.rb +16 -0
  77. data/lib/toji/utils.rb +43 -0
  78. data/lib/toji/version.rb +1 -1
  79. metadata +59 -40
  80. data/lib/toji/brew.rb +0 -18
  81. data/lib/toji/brew/base.rb +0 -55
  82. data/lib/toji/brew/builder.rb +0 -98
  83. data/lib/toji/brew/graph.rb +0 -11
  84. data/lib/toji/brew/koji.rb +0 -11
  85. data/lib/toji/brew/moto.rb +0 -11
  86. data/lib/toji/brew/state.rb +0 -122
  87. data/lib/toji/brew/wrapped_state.rb +0 -109
  88. data/lib/toji/ingredient/kake/actual.rb +0 -26
  89. data/lib/toji/ingredient/kake/base.rb +0 -18
  90. data/lib/toji/ingredient/kake/expected.rb +0 -40
  91. data/lib/toji/ingredient/koji/actual.rb +0 -29
  92. data/lib/toji/ingredient/koji/actual_fermentable.rb +0 -15
  93. data/lib/toji/ingredient/koji/base.rb +0 -35
  94. data/lib/toji/ingredient/koji/expected.rb +0 -45
  95. data/lib/toji/ingredient/koji/expected_fermentable.rb +0 -15
  96. data/lib/toji/ingredient/koji_rate.rb +0 -16
  97. data/lib/toji/ingredient/rice/actual_steamable.rb +0 -27
  98. data/lib/toji/ingredient/rice/base.rb +0 -40
  99. data/lib/toji/ingredient/rice/expected_steamable.rb +0 -27
  100. data/lib/toji/ingredient/rice_rate.rb +0 -23
  101. data/lib/toji/product/event.rb +0 -13
  102. data/lib/toji/product/rice_event.rb +0 -28
  103. data/lib/toji/product/rice_event_group.rb +0 -19
@@ -1,23 +0,0 @@
1
- module Toji
2
- module Ingredient
3
- class RiceRate
4
- # 浸漬米吸水率
5
- attr_reader :soaked_rate
6
-
7
- # 蒸米吸水率
8
- attr_reader :steamed_rate
9
-
10
- # 放冷後蒸米吸水率
11
- attr_reader :cooled_rate
12
-
13
- def initialize(soaked_rate, steamed_rate, cooled_rate)
14
- @soaked_rate = soaked_rate
15
- @steamed_rate = steamed_rate
16
- @cooled_rate = cooled_rate
17
- end
18
-
19
-
20
- DEFAULT = new(0.33, 0.41, 0.33)
21
- end
22
- end
23
- end
@@ -1,13 +0,0 @@
1
- module Toji
2
- module Product
3
- class Event
4
- attr_reader :date
5
- attr_reader :type
6
-
7
- def initialize(date, type)
8
- @date = date
9
- @type = type
10
- end
11
- end
12
- end
13
- end
@@ -1,28 +0,0 @@
1
- require 'toji/product/event'
2
-
3
- module Toji
4
- module Product
5
- class RiceEvent < Event
6
- attr_reader :product
7
- attr_reader :index
8
- attr_reader :group_index
9
- attr_reader :weight
10
-
11
- def initialize(product:, type:, index:, group_index:, date:, weight:)
12
- super(date, type)
13
- @product = product
14
- @index = index
15
- @group_index = group_index
16
- @weight = weight
17
- end
18
-
19
- def group_key
20
- a = []
21
- a << product.reduce_key
22
- a << type
23
- a << group_index
24
- a.map(&:to_s).join(":")
25
- end
26
- end
27
- end
28
- end
@@ -1,19 +0,0 @@
1
- require 'toji/product/event'
2
-
3
- module Toji
4
- module Product
5
- class RiceEventGroup < Event
6
- attr_reader :breakdown
7
-
8
- def initialize(events)
9
- o = events.first
10
- super(o&.date, o&.type)
11
- @breakdown = events
12
- end
13
-
14
- def weight
15
- @breakdown.map(&:weight).sum
16
- end
17
- end
18
- end
19
- end