toji 2.7.1 → 2.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56de715e78ed6183d24009f05ba8c1e87c5d7d293c1536946b056f65f848ba55
4
- data.tar.gz: d3b273a52c6960cad1cea55425942b3548d947df93abee5321bee1e63506fb67
3
+ metadata.gz: 6064acd8dc9d6655025954b4f6e7af6eb2ff57a5e96b8b3bab0b1dd9840fd892
4
+ data.tar.gz: 91bb99e9d7b664863773e5b1bf52e7fbb1bd0bf3961ace3b7b1d874b4963d437
5
5
  SHA512:
6
- metadata.gz: b7c2f52e5fca256c6adf6589b561bf7239ade63fb57198a9257d390b9c1866b325baa748cdb6c7f5c9ba1e8ad34dda7022819b7ba8e9cad26cd3c565616f5a27
7
- data.tar.gz: fc50c1770c0679eecd19b2e0367afd51a43fb4d02e5fe808849d4ba6e694e27bcc91046c4a4fef94637ca2721ab8ce164e66f1b8db2f18d9f42dcbb19a6ee877
6
+ metadata.gz: 23dbc8597c3c9e366d14e5aaf02bcca1b3512d244ae52e789ef918f392e5504f9e2acbceeb3a2174f11239dcb8966b4b6d82ac3b03df6fdaa7ed8dc7e1adbb1d
7
+ data.tar.gz: bf3d505d1e0e7770d4efa74df9c67e8638eebfe622127feb854716be2c07ea268b853b84462b3f7e5920dc8892ad1b1be633633456e916a8a3c01cb6baf68be2
@@ -56,8 +56,8 @@ module Example
56
56
  include Toji::Brew::Koji
57
57
  end
58
58
 
59
- class Shubo < Base
60
- include Toji::Brew::Shubo
59
+ class Moto < Base
60
+ include Toji::Brew::Moto
61
61
  end
62
62
 
63
63
  class Moromi < Base
@@ -68,6 +68,7 @@ module Example
68
68
 
69
69
  class Step
70
70
  include Toji::Recipe::Step
71
+ attr_accessor :name
71
72
 
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)
73
74
  new.tap {|o|
@@ -2,12 +2,12 @@ require 'toji'
2
2
  require_relative 'example_core'
3
3
  require 'terminal-table'
4
4
 
5
- shubo = Example::Brew::Shubo.load_yaml_file(File.dirname(__FILE__)+"/shubo.yaml")
5
+ moto = Example::Brew::Moto.load_yaml_file(File.dirname(__FILE__)+"/moto.yaml")
6
6
 
7
7
  table = Terminal::Table.new do |t|
8
8
  t << ["作業", "日数", "品温(度)", "ボーメ", "酸度", "経過時間", "日時"]
9
9
  t << :separator
10
- shubo.wrapped_states.each {|s|
10
+ moto.wrapped_states.each {|s|
11
11
  temp = s.temps.map(&:to_s).join(" / ")
12
12
  t << [s.mark, s.day_label, temp, s.baume, s.acid, s.elapsed_time, s.display_time]
13
13
  }
File without changes
@@ -14,5 +14,5 @@ require 'toji/brew/builder'
14
14
  require 'toji/brew/graph'
15
15
 
16
16
  require 'toji/brew/koji'
17
- require 'toji/brew/shubo'
17
+ require 'toji/brew/moto'
18
18
  require 'toji/brew/moromi'
@@ -1,6 +1,6 @@
1
1
  module Toji
2
2
  module Brew
3
- module Shubo
3
+ module Moto
4
4
  include Base
5
5
 
6
6
  def progress(name: nil, dash: :solid, enable_annotations: true)
@@ -4,7 +4,7 @@ require 'toji/recipe/ab_expect'
4
4
  module Toji
5
5
  module Recipe
6
6
  attr_accessor :steps
7
- attr_accessor :has_shubo
7
+ attr_accessor :has_moto
8
8
  attr_accessor :has_moromi
9
9
  attr_accessor :ab_coef
10
10
  attr_accessor :ab_expects
@@ -18,7 +18,7 @@ module Toji
18
18
 
19
19
  self.class.new.tap {|o|
20
20
  o.steps = new_steps
21
- o.has_shubo = has_shubo
21
+ o.has_moto = has_moto
22
22
  o.has_moromi = has_moromi
23
23
  o.ab_coef = ab_coef
24
24
  o.ab_expects = ab_expects.deep_dup
@@ -33,7 +33,7 @@ module Toji
33
33
 
34
34
  self.class.new.tap {|o|
35
35
  o.steps = new_steps
36
- o.has_shubo = has_shubo
36
+ o.has_moto = has_moto
37
37
  o.has_moromi = has_moromi
38
38
  o.ab_coef = ab_coef
39
39
  o.ab_expects = ab_expects.deep_dup
@@ -51,12 +51,12 @@ module Toji
51
51
  end
52
52
 
53
53
  # 酒母歩合の累計
54
- def cumulative_shubo_rates
54
+ def cumulative_moto_rates
55
55
  rice_total = steps.map(&:rice_total)
56
- shubo = rice_total.first
56
+ moto = rice_total.first
57
57
 
58
58
  rice_total.map.with_index {|x,i|
59
- shubo / rice_total[0..i].inject(&:+)
59
+ moto / rice_total[0..i].inject(&:+)
60
60
  }
61
61
  end
62
62
 
@@ -66,8 +66,8 @@ module Toji
66
66
  # 汲水歩合が大きい高温糖化酒母では6%程度である
67
67
  #
68
68
  # 出典: 酒造教本 P96
69
- def shubo_rate
70
- cumulative_shubo_rates.last || 0.0
69
+ def moto_rate
70
+ cumulative_moto_rates.last || 0.0
71
71
  end
72
72
 
73
73
  # 白米比率
@@ -1,3 +1,3 @@
1
1
  module Toji
2
- VERSION = "2.7.1"
2
+ VERSION = "2.8.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toji
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshida Tetsuya
@@ -122,10 +122,9 @@ files:
122
122
  - example/moromi.ipynb
123
123
  - example/moromi.rb
124
124
  - example/moromi.yaml
125
+ - example/moto.rb
126
+ - example/moto.yaml
125
127
  - example/recipe.rb
126
- - example/shubo.ipynb
127
- - example/shubo.rb
128
- - example/shubo.yaml
129
128
  - lib/toji.rb
130
129
  - lib/toji/brew.rb
131
130
  - lib/toji/brew/base.rb
@@ -137,7 +136,7 @@ files:
137
136
  - lib/toji/brew/graph/progress.rb
138
137
  - lib/toji/brew/koji.rb
139
138
  - lib/toji/brew/moromi.rb
140
- - lib/toji/brew/shubo.rb
139
+ - lib/toji/brew/moto.rb
141
140
  - lib/toji/brew/state.rb
142
141
  - lib/toji/brew/wrapped_state.rb
143
142
  - lib/toji/calendar.rb
@@ -191,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
191
190
  - !ruby/object:Gem::Version
192
191
  version: '0'
193
192
  requirements: []
194
- rubygems_version: 3.0.4
193
+ rubygems_version: 3.1.2
195
194
  signing_key:
196
195
  specification_version: 4
197
196
  summary: Management tools for brewing japanese sake.
@@ -1,121 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "metadata": {},
7
- "outputs": [
8
- {
9
- "data": {
10
- "text/html": [
11
- "\n",
12
- " <script>\n",
13
- " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
14
- " </script>\n",
15
- "\n",
16
- "\n",
17
- "<div id=\"105867eb-e572-490c-8509-e506179e76ad\" style=\"height: 100%; width: 100%;\"></div>\n",
18
- "\n",
19
- "<script>\n",
20
- " require(['plotly'], function(Plotly) { \n",
21
- "Plotly.newPlot(\n",
22
- " '105867eb-e572-490c-8509-e506179e76ad',\n",
23
- " [{\"x\":[0.0,3600.0,86400.0,172800.0,172801.0,259200.0,259201.0,345600.0,345601.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[12.0,20.0,14.0,8.0,11.0,10.0,13.0,12.0,15.0,14.0,20.0,20.0,20.0,20.0,15.0,12.0,10.0,9.0],\"text\":[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"temps\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#1f77b4\"}},{\"x\":[86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[15.0,16.0,16.5,17.0,17.0,17.0,14.0,12.0,9.0,8.0,7.0,6.0,5.0],\"text\":[\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"baume\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#9467bd\"}},{\"x\":[0.0,3600.0,86400.0,172800.0,259200.0,345600.0,432000.0,518400.0,604800.0,691200.0,777600.0,864000.0,950400.0,1036800.0,1123200.0],\"y\":[13.0,13.0,13.0,13.0,13.5,13.5,14.0,14.5,15.5,16.0,16.0,16.5,17.0,17.5,17.5],\"text\":[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],\"name\":\"acid\",\"line\":{\"dash\":\"solid\",\"shape\":\"linear\"},\"marker\":{\"color\":\"#8c564b\"}}],\n",
24
- " {\"xaxis\":{\"dtick\":86400,\"tickvals\":[0,86400,172800,259200,345600,432000,518400,604800,691200,777600,864000,950400,1036800,1123200],\"ticktext\":[\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\"]},\"annotations\":[{\"x\":0.0,\"y\":12.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"水麹\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":3600.0,\"y\":20.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"仕込み\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":86400.0,\"y\":14.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"打瀬\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40},{\"x\":777600.0,\"y\":20.0,\"xref\":\"x\",\"yref\":\"y\",\"text\":\"分け\",\"showarrow\":true,\"arrowhead\":1,\"ax\":0,\"ay\":-40}]},\n",
25
- " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
26
- ")\n",
27
- "\n",
28
- "window.addEventListener('resize', function() {\n",
29
- " Plotly.Plots.resize(document.getElementById('105867eb-e572-490c-8509-e506179e76ad'))\n",
30
- "})\n",
31
- " }) \n",
32
- "</script>"
33
- ],
34
- "text/plain": [
35
- "#<Plotly::Offline::HTML:0x00007f983ea69c48 @id=\"105867eb-e572-490c-8509-e506179e76ad\", @data=[{:x=>[0.0, 3600.0, 86400.0, 172800.0, 172801.0, 259200.0, 259201.0, 345600.0, 345601.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[12.0, 20.0, 14.0, 8.0, 11.0, 10.0, 13.0, 12.0, 15.0, 14.0, 20.0, 20.0, 20.0, 20.0, 15.0, 12.0, 10.0, 9.0], :text=>[\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"temps\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#1f77b4\"}}, {:x=>[86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[15.0, 16.0, 16.5, 17.0, 17.0, 17.0, 14.0, 12.0, 9.0, 8.0, 7.0, 6.0, 5.0], :text=>[\"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"baume\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#9467bd\"}}, {:x=>[0.0, 3600.0, 86400.0, 172800.0, 259200.0, 345600.0, 432000.0, 518400.0, 604800.0, 691200.0, 777600.0, 864000.0, 950400.0, 1036800.0, 1123200.0], :y=>[13.0, 13.0, 13.0, 13.0, 13.5, 13.5, 14.0, 14.5, 15.5, 16.0, 16.0, 16.5, 17.0, 17.5, 17.5], :text=>[\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], :name=>\"acid\", :line=>{:dash=>:solid, :shape=>:linear}, :marker=>{:color=>\"#8c564b\"}}], @layout={:xaxis=>{:dtick=>86400, :tickvals=>[0, 86400, 172800, 259200, 345600, 432000, 518400, 604800, 691200, 777600, 864000, 950400, 1036800, 1123200], :ticktext=>[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\"]}, :annotations=>[{:x=>0.0, :y=>12.0, :xref=>\"x\", :yref=>\"y\", :text=>\"水麹\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>3600.0, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>\"仕込み\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>86400.0, :y=>14.0, :xref=>\"x\", :yref=>\"y\", :text=>\"打瀬\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}, {:x=>777600.0, :y=>20.0, :xref=>\"x\", :yref=>\"y\", :text=>\"分け\", :showarrow=>true, :arrowhead=>1, :ax=>0, :ay=>-40}]}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
36
- ]
37
- },
38
- "metadata": {},
39
- "output_type": "display_data"
40
- },
41
- {
42
- "data": {
43
- "text/html": [
44
- "\n",
45
- " <script>\n",
46
- " requirejs.config({paths: { 'plotly': ['https://cdn.plot.ly/plotly-latest.min'] }})\n",
47
- " </script>\n",
48
- "\n",
49
- "\n",
50
- "<div id=\"23560ab9-b0dc-4006-9779-b9219ab608c6\" style=\"height: 100%; width: 100%;\"></div>\n",
51
- "\n",
52
- "<script>\n",
53
- " require(['plotly'], function(Plotly) { \n",
54
- "Plotly.newPlot(\n",
55
- " '23560ab9-b0dc-4006-9779-b9219ab608c6',\n",
56
- " [{\"type\":\"table\",\"header\":{\"values\":[\"day_label\",\"display_time\",\"mark\",\"temps\",\"display_baume\",\"acid\",\"warmings\"]},\"cells\":{\"values\":[[\"1\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\",\"12\",\"13\",\"14\"],[\"01/16 00:00\",\"01/16 01:00\",\"01/17 00:00\",\"01/18 00:00\",\"01/19 00:00\",\"01/20 00:00\",\"01/21 00:00\",\"01/22 00:00\",\"01/23 00:00\",\"01/24 00:00\",\"01/25 00:00\",\"01/26 00:00\",\"01/27 00:00\",\"01/28 00:00\",\"01/29 00:00\"],[\"水麹\",\"仕込み\",\"打瀬\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"分け\",\"\",\"\",\"\",\"\"],[\"12.0\",\"20.0\",\"14.0\",\"8.0, 11.0\",\"10.0, 13.0\",\"12.0, 15.0\",\"14.0\",\"20.0\",\"20.0\",\"20.0\",\"20.0\",\"15.0\",\"12.0\",\"10.0\",\"9.0\"],[\"\",\"\",15.0,16.0,16.5,17.0,17.0,17.0,14.0,12.0,9.0,8.0,7.0,6.0,5.0],[13.0,13.0,13.0,13.0,13.5,13.5,14.0,14.5,15.5,16.0,16.0,16.5,17.0,17.5,17.5],[\"\",\"\",\"\",\"暖気\",\"暖気\",\"暖気\",\"行火\",\"行火\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"]]}}],\n",
57
- " {\"height\":650},\n",
58
- " {\"linkText\":\"Export to plot.ly\",\"showLink\":true}\n",
59
- ")\n",
60
- "\n",
61
- "window.addEventListener('resize', function() {\n",
62
- " Plotly.Plots.resize(document.getElementById('23560ab9-b0dc-4006-9779-b9219ab608c6'))\n",
63
- "})\n",
64
- " }) \n",
65
- "</script>"
66
- ],
67
- "text/plain": [
68
- "#<Plotly::Offline::HTML:0x00007f9841041718 @id=\"23560ab9-b0dc-4006-9779-b9219ab608c6\", @data=[{:type=>:table, :header=>{:values=>[:day_label, :display_time, :mark, :temps, :display_baume, :acid, :warmings]}, :cells=>{:values=>[[\"1\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\", \"13\", \"14\"], [\"01/16 00:00\", \"01/16 01:00\", \"01/17 00:00\", \"01/18 00:00\", \"01/19 00:00\", \"01/20 00:00\", \"01/21 00:00\", \"01/22 00:00\", \"01/23 00:00\", \"01/24 00:00\", \"01/25 00:00\", \"01/26 00:00\", \"01/27 00:00\", \"01/28 00:00\", \"01/29 00:00\"], [\"水麹\", \"仕込み\", \"打瀬\", \"\", \"\", \"\", \"\", \"\", \"\", \"\", \"分け\", \"\", \"\", \"\", \"\"], [\"12.0\", \"20.0\", \"14.0\", \"8.0, 11.0\", \"10.0, 13.0\", \"12.0, 15.0\", \"14.0\", \"20.0\", \"20.0\", \"20.0\", \"20.0\", \"15.0\", \"12.0\", \"10.0\", \"9.0\"], [\"\", \"\", 15.0, 16.0, 16.5, 17.0, 17.0, 17.0, 14.0, 12.0, 9.0, 8.0, 7.0, 6.0, 5.0], [13.0, 13.0, 13.0, 13.0, 13.5, 13.5, 14.0, 14.5, 15.5, 16.0, 16.0, 16.5, 17.0, 17.5, 17.5], [\"\", \"\", \"\", \"暖気\", \"暖気\", \"暖気\", \"行火\", \"行火\", \"\", \"\", \"\", \"\", \"\", \"\", \"\"]]}}], @layout={:height=>650}, @config={:linkText=>\"Export to plot.ly\", :showLink=>true}, @embedded=true>"
69
- ]
70
- },
71
- "metadata": {},
72
- "output_type": "display_data"
73
- },
74
- {
75
- "data": {
76
- "text/plain": [
77
- "#<CZTop::Socket::PUB:0x7f984321b6b0 last_endpoint=\"tcp://127.0.0.1:56600\">"
78
- ]
79
- },
80
- "execution_count": 1,
81
- "metadata": {},
82
- "output_type": "execute_result"
83
- }
84
- ],
85
- "source": [
86
- "$LOAD_PATH << File.dirname(__FILE__) + \"/../lib\"\n",
87
- "require 'toji'\n",
88
- "require './example_core'\n",
89
- "require 'rbplotly'\n",
90
- "\n",
91
- "shubo = Example::Brew::Shubo.load_yaml_file(\"shubo.yaml\")\n",
92
- "shubo.progress.plot.show\n",
93
- "shubo.progress.table.tap {|t|\n",
94
- " t.layout.height = 650\n",
95
- "}.show"
96
- ]
97
- },
98
- {
99
- "cell_type": "code",
100
- "execution_count": null,
101
- "metadata": {},
102
- "outputs": [],
103
- "source": []
104
- }
105
- ],
106
- "metadata": {
107
- "kernelspec": {
108
- "display_name": "Ruby 2.7.1",
109
- "language": "ruby",
110
- "name": "ruby"
111
- },
112
- "language_info": {
113
- "file_extension": ".rb",
114
- "mimetype": "application/x-ruby",
115
- "name": "ruby",
116
- "version": "2.6.3"
117
- }
118
- },
119
- "nbformat": 4,
120
- "nbformat_minor": 2
121
- }