Merge lp:~gmb/charm-tools/add-charm-helpers into lp:~charmers/charm-tools/trunk
| Status: | Merged |
|---|---|
| Approved by: | Clint Byrum on 2012-03-20 |
| Approved revision: | 146 |
| Merged at revision: | 156 |
| Proposed branch: | lp:~gmb/charm-tools/add-charm-helpers |
| Merge into: | lp:~charmers/charm-tools/trunk |
| Diff against target: |
863 lines (+833/-0) 5 files modified
Makefile (+1/-0) ez_setup.py (+288/-0) helpers/python/charmhelpers/__init__.py (+181/-0) helpers/python/charmhelpers/tests/test_charmhelpers.py (+331/-0) setup.py (+32/-0) |
| To merge this branch: | bzr merge lp:~gmb/charm-tools/add-charm-helpers |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Clint Byrum (community) | 2012-03-06 | Approve on 2012-03-20 | |
|
Review via email:
|
|||
Description of the Change
This branch adds Python helpers to the charm-tools helpers/ directory. The Python helpers code comes from our (Launchpad Yellow Squad) efforts to make charms for buildbot and buildslave, and should be generic enough for any charms whose hooks are written in Python.
- 131. By Graham Binns on 2012-03-12
-
Debugging...
- 132. By Graham Binns on 2012-03-13
-
Added setuptools egg. This is a terrible idea.
- 133. By Graham Binns on 2012-03-13
-
Removed cruft.
- 134. By Graham Binns on 2012-03-13
-
Tweaked Makefile.
- 135. By Graham Binns on 2012-03-14
-
Tweaked setup.py.
- 136. By Graham Binns on 2012-03-14
-
Undid everything that I changed since Brad's branch.
| Clint Byrum (clint-fewbar) wrote : | # |
- 137. By Graham Binns on 2012-03-15
-
Added initial tests.
- 138. By Graham Binns on 2012-03-15
-
Added more tests.
- 139. By Graham Binns on 2012-03-15
-
And yet more tests...
- 140. By Graham Binns on 2012-03-16
-
More tests, plus unit_info tweakage.
- 141. By Graham Binns on 2012-03-16
-
More tests.
- 142. By Graham Binns on 2012-03-16
-
Tests for wait_for_machine().
- 143. By Graham Binns on 2012-03-16
-
Added tests for wait_for_unit.
- 144. By Graham Binns on 2012-03-19
-
Added tests for wait_for_relation.
- 145. By Graham Binns on 2012-03-19
-
Added tests for wait_for_
page_contents. - 146. By Graham Binns on 2012-03-19
-
Added Python tests to Makefile.
| Graham Binns (gmb) wrote : | # |
Hi Clint,
As you can see, I've added plenty of test :). The whole module should now be covered. I've used testools in order to be able to do some safe monkey-patching, so python-testtools needs to be made a dependency of charm-tools.
I'll look into the python-
| Graham Binns (gmb) wrote : | # |
Confirmed; python-
| Clint Byrum (clint-fewbar) wrote : | # |
Graham, this is fantastic.
One thing, python policy requires that the binary package name be
python-shelltoolbox
So as to match the python module to the package name easily.
I like the way these look, and think they'll be fantastic additions for charm authors writing charms in python.
+1
Next steps:
We should pull python-shelltoolbox (once re-named) into the charm-helpers PPA, and host the packaging branch for that under ~charmers. I'd like to delay that until we have at least submitted python-shelltoolbox to Ubuntu so we can make use of it in the archive version of charm-tools.
Please ACK the binary package name change and I'll handle the upload to Ubuntu and subsequent adding to the PPA/merging into charm-tools trunk.
THANKS YELLOW SQUAD!
| Graham Binns (gmb) wrote : | # |
Hi Clint,
Consider this the ACK you requested; let's rename it and get it out
into the wide world.
Let me know if there's anything else you need from me; I'll take care
of it first thing tomorrow.
Cheers,
Graham


These all look good, but I'd like to see some tests!
I had to manually import the module to find out I was missing 'shelltoolbox'.
It took me another 20 minutes to figure out that this was where the meat of what you guys have done lives, and its not yet packaged, so depending on it becomes problematic.
Anyway, I think this is good to go, but needs to be deferred until python- shell-toolbox is packaged so that this module can depend on it.
incidentally, I was able to get the packaging for charm-tools setup in a way to build/install this module here:
lp:~clint-fewbar/ubuntu/precise/charm-tools/add-python-packaging