mirror of
https://github.com/shouptech/synthale.git
synced 2026-02-03 23:49:45 +00:00
Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cbd2619f90 | |||
| 0214065276 | |||
| dae353ce72 |
8 changed files with 50 additions and 9 deletions
15
CHANGELOG.rst
Normal file
15
CHANGELOG.rst
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
Changelog
|
||||||
|
=========
|
||||||
|
|
||||||
|
0.1.1 - 2018-01-04
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* Fix `Issue 1`_, dry hop times are now in days.
|
||||||
|
* Added a Changelog
|
||||||
|
|
||||||
|
.. _`Issue 1`: https://github.com/shouptech/synthale/issues/1
|
||||||
|
|
||||||
|
0.1.0 - 2018-01-03
|
||||||
|
------------------
|
||||||
|
|
||||||
|
* Initial release
|
||||||
|
|
@ -55,9 +55,9 @@ author = 'Mike Shoup'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.1.0'
|
version = '0.1.1'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.1.0'
|
release = '0.1.1'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[bumpversion]
|
[bumpversion]
|
||||||
current_version = 0.1.0
|
current_version = 0.1.1
|
||||||
commit = True
|
commit = True
|
||||||
tag = True
|
tag = True
|
||||||
tag_name = {new_version}
|
tag_name = {new_version}
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -28,7 +28,7 @@ install_requires = [
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='synthale',
|
name='synthale',
|
||||||
version='0.1.0',
|
version='0.1.1',
|
||||||
url='https://github.com/shouptech/synthale',
|
url='https://github.com/shouptech/synthale',
|
||||||
author='Mike Shoup',
|
author='Mike Shoup',
|
||||||
author_email='mike@shoup.io',
|
author_email='mike@shoup.io',
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,4 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
VERSION = '0.1.0'
|
VERSION = '0.1.1'
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,7 @@ class MarkdownRecipe:
|
||||||
headers = ('Name', 'Origin', 'Alpha', 'Amount', 'Time', 'Use')
|
headers = ('Name', 'Origin', 'Alpha', 'Amount', 'Time', 'Use')
|
||||||
rows = []
|
rows = []
|
||||||
for hop in self.recipe.hops:
|
for hop in self.recipe.hops:
|
||||||
|
# Determine hop unit
|
||||||
if self.hop_unit == 'pounds':
|
if self.hop_unit == 'pounds':
|
||||||
amt = convert.pounds(hop.amount, '.2f')
|
amt = convert.pounds(hop.amount, '.2f')
|
||||||
elif self.hop_unit == 'grams':
|
elif self.hop_unit == 'grams':
|
||||||
|
|
@ -193,12 +194,19 @@ class MarkdownRecipe:
|
||||||
amt = convert.kilograms(hop.amount, '.2f')
|
amt = convert.kilograms(hop.amount, '.2f')
|
||||||
else:
|
else:
|
||||||
amt = convert.ounces(hop.amount, '.1f')
|
amt = convert.ounces(hop.amount, '.1f')
|
||||||
|
|
||||||
|
# Determine hop timing
|
||||||
|
if hop.use == 'Dry Hop':
|
||||||
|
# 1 day = 1440 minutes
|
||||||
|
time = '{:.1f} days'.format(hop.time / 1440.0)
|
||||||
|
else:
|
||||||
|
time = '{} min'.format(int(round(hop.time)))
|
||||||
rows.append((
|
rows.append((
|
||||||
hop.name,
|
hop.name,
|
||||||
hop.origin,
|
hop.origin,
|
||||||
'{:.1f} %'.format(hop.alpha),
|
'{:.1f} %'.format(hop.alpha),
|
||||||
amt,
|
amt,
|
||||||
'{}'.format(int(round(hop.time))),
|
time,
|
||||||
hop.use,
|
hop.use,
|
||||||
))
|
))
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,19 @@
|
||||||
<DISPLAY_TIME>60.0 min</DISPLAY_TIME>
|
<DISPLAY_TIME>60.0 min</DISPLAY_TIME>
|
||||||
<NOTES></NOTES>
|
<NOTES></NOTES>
|
||||||
</HOP>
|
</HOP>
|
||||||
|
<HOP>
|
||||||
|
<NAME>Cascade</NAME>
|
||||||
|
<ORIGIN>U.S.</ORIGIN>
|
||||||
|
<ALPHA>5.5</ALPHA>
|
||||||
|
<BETA></BETA>
|
||||||
|
<AMOUNT>0.0141747</AMOUNT>
|
||||||
|
<DISPLAY_AMOUNT>0.5 oz</DISPLAY_AMOUNT>
|
||||||
|
<USE>Dry Hop</USE>
|
||||||
|
<FORM>Pellet</FORM>
|
||||||
|
<TIME>7200</TIME>
|
||||||
|
<DISPLAY_TIME>5 days</DISPLAY_TIME>
|
||||||
|
<NOTES></NOTES>
|
||||||
|
</HOP>
|
||||||
</HOPS>
|
</HOPS>
|
||||||
<YEASTS>
|
<YEASTS>
|
||||||
<YEAST>
|
<YEAST>
|
||||||
|
|
|
||||||
|
|
@ -128,9 +128,14 @@ def test_recipe_hops(md_weizen):
|
||||||
assert md_weizen.hops == (
|
assert md_weizen.hops == (
|
||||||
'Hops\n'
|
'Hops\n'
|
||||||
'----\n'
|
'----\n'
|
||||||
'| Name | Origin | Alpha | Amount | Time | Use |\n'
|
'| Name | Origin | Alpha | Amount | Time |'
|
||||||
'| -------------------- | ------- | ----- | ------ | ---- | ---- |\n'
|
' Use |\n'
|
||||||
'| Northern Brewer (DE) | Germany | 4.9 % | 1.0 oz | 60 | Boil |'
|
'| -------------------- | ------- | ----- | ------ | -------- |'
|
||||||
|
' ------- |\n'
|
||||||
|
'| Northern Brewer (DE) | Germany | 4.9 % | 1.0 oz | 60 min |'
|
||||||
|
' Boil |\n'
|
||||||
|
'| Cascade | U.S. | 5.5 % | 0.5 oz | 5.0 days |'
|
||||||
|
' Dry Hop |'
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue