hotzenklotz / pybeerxml

A simple BeerXML parser for Python
MIT License
19 stars 16 forks source link

corrected issue with mash step parsing #11

Closed jwjulien closed 5 years ago

jwjulien commented 5 years ago

(wonderful utility!) I'm using this in a project and noticed that BrewTarget exports BeerXML such that subsequent mash "steps" overwrite the actual mash steps. My proposed correction creates a single "mash" object and them populates it, similar to the other objects (fermentables, hops, etc.).

This is an example CoffeeStout.zip recipe that previously would cause index errors during my parsing as the mash was being obliterated. With my change it seems to work as expected, at least in my application.

I do apologize, if I had more time I would create a mash test case for you to catch this in the future, however, life persists. If you choose to accept my change, hooray!

hotzenklotz commented 5 years ago

@jwjulien Thanks for the contribution and sorry for the long wait. Your fix looks good to me. With your permission I will include your Coffee Stout recipe in the tests as well.

jwjulien commented 5 years ago

No problem. By all means. It turned out pretty good so maybe someone else might like to give it a try.

On Thu, Sep 19, 2019 at 11:01 AM Tom Herold notifications@github.com wrote:

Merged #11 https://github.com/hotzenklotz/pybeerxml/pull/11 into master.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hotzenklotz/pybeerxml/pull/11?email_source=notifications&email_token=AGCEGOPBLEUQWIATGD2ADVDQKOH6HA5CNFSM4IUEI2UKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOTXFTGOQ#event-2647339834, or mute the thread https://github.com/notifications/unsubscribe-auth/AGCEGONCOU63EMVYQOTQHHDQKOH6HANCNFSM4IUEI2UA .

hotzenklotz commented 5 years ago

Alright, I added the recipe as part of a unit test. Your changes should be available from PyPi now as version 1.0.7. Thanks for the contribution.

BTW, do you have any other feedback regarding the library? Any feature request, comments? Other "bugs" or inaccurate calculations? Thanks for your input.

jwjulien commented 5 years ago

Not at the moment. I'm still working on the tool that's using your library so if I happen to run into any more issues or come up with any ideas I'll let you know.

On Fri, Sep 20, 2019 at 4:14 AM Tom Herold notifications@github.com wrote:

Alright, I added the recipe as part of a unit test. Your changes should be available from PyPi now as version 1.0.7. Thanks for the contribution.

BTW, do you have any other feedback regarding the library? Any feature request, comments? Other "bugs" or inaccurate calculations? Thanks for your input.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hotzenklotz/pybeerxml/pull/11?email_source=notifications&email_token=AGCEGOI3J2RPZHFXNVSXWCTQKSA7XA5CNFSM4IUEI2UKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7F6NAI#issuecomment-533456513, or mute the thread https://github.com/notifications/unsubscribe-auth/AGCEGOLPZEDE2ZDPIVL5JSLQKSA7XANCNFSM4IUEI2UA .