1
0
Fork 0
mirror of https://github.com/shouptech/synthale.git synced 2026-02-03 23:49:45 +00:00

Compare commits

..

No commits in common. "master" and "0.1.0" have entirely different histories.

8 changed files with 9 additions and 50 deletions

View file

@ -1,15 +0,0 @@
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

View file

@ -55,9 +55,9 @@ author = 'Mike Shoup'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.1.1' version = '0.1.0'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.1.1' release = '0.1.0'
# 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.

View file

@ -1,5 +1,5 @@
[bumpversion] [bumpversion]
current_version = 0.1.1 current_version = 0.1.0
commit = True commit = True
tag = True tag = True
tag_name = {new_version} tag_name = {new_version}

View file

@ -28,7 +28,7 @@ install_requires = [
setup( setup(
name='synthale', name='synthale',
version='0.1.1', version='0.1.0',
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',

View file

@ -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.1' VERSION = '0.1.0'

View file

@ -185,7 +185,6 @@ 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':
@ -194,19 +193,12 @@ 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,
time, '{}'.format(int(round(hop.time))),
hop.use, hop.use,
)) ))
return ( return (

View file

@ -76,19 +76,6 @@
<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>

View file

@ -128,14 +128,9 @@ 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 |' '| Name | Origin | Alpha | Amount | Time | Use |\n'
' Use |\n' '| -------------------- | ------- | ----- | ------ | ---- | ---- |\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 |'
) )