adonig / aloisius

A Python library to create/update/delete AWS CloudFormation stacks in parallel
BSD 2-Clause "Simplified" License
15 stars 6 forks source link

Iterator #1

Closed diasjorge closed 7 years ago

diasjorge commented 7 years ago

This pull request adds support so you can iterate over the outputs

diasjorge commented 7 years ago

Hi, thanks for the quick merge. How do you handle releases? Could we have a new version with this changes? Additionally I'd like to say thanks for creating this package. I'll be sending some more changes in the upcoming weeks :)

adonig commented 7 years ago

Thanks for contributing! I’m currently working on something completely different, but I could come up with a new release maybe like next weekend. What changes are you working on? I also have a change I wanted to add with the next release. I wanted to make use of the “new" CloudFormation waiters. They look more reliable than Stack._wait_until_done. Please let me know if we are working on the same thing :)

diasjorge commented 7 years ago

Hi, so I'd like to have more information when there are errors applying the stacks

On 22 Feb 2017, at 17:59, Andreas Donig notifications@github.com wrote:

Thanks for contributing! I’m currently working on something completely different, but I could come up with a new release maybe like next weekend. What changes are you working on? I also have a change I wanted to add with the next release. I wanted to make use of the “new" CloudFormation waiters. They look more reliable than Stack._wait_until_done. Please let me know if we are working on the same thing :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

adonig commented 7 years ago

Hi again! I've extended FutureOutputs so it inherits from collections.Mapping. That way we can have all those nice methods like __contains__, keys, values, items etc. without a lot of manual labour. I've also extended your test and switched from unittest to pytest because IMO it's nicer having all those fixtures and stuff. You can install the development dependencies like this: pip install -e .[dev] and simply run the tests with pytest. I've removed the iteritems method, because it was kind of deprecated by the items method by PEP 469. You can key-value-iterate the outputs like this: for key, value in stack.outputs.items():. If you are okay with the changes, I'm probably going to package it and make it a 0.4 release tomorrow :)

diasjorge commented 7 years ago

Hi,

I really like the changes. I didn't want to introduce more dependencies but I also prefer pytest.

I tried looking at the waiters you mentioned a bit but wasn't sure how to approach it.

By the way maybe could you set up Travis so we can have the tests running for future changes?

On 25 Feb 2017, at 17:04, Andreas Donig notifications@github.com wrote:

Hi again! I've extended FutureOutputs so it inherits from collection.Mapping. That way we can have all those nice methods like contains, keys, values, items etc. without a lot of manual labour. I've also extended your test and switched from unittest to pytest because IMO it's nicer having all those fixtures and stuff. You can install the development dependencies like this: pip install -e .[dev] and simply run the tests with pytest. I've removed the iteritems method, because it was kind of deprecated by the items method by PEP 469. You can key-value-iterate the outputs like this: for key, value in stack.outputs.items():. If you are okay with the changes, I'm probably going to package it and make it a 0.4 release tomorrow :)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

adonig commented 7 years ago

Just wanted to let you know that I've pushed a 0.3.1 release to PyPI. I skipped the waiters because I had no time. I'm going to try the Travis thing probably tomorrow :)