Thanks for all the feedback! You're definitely on the right track, and
with your help we'll be able to make this thing awesome.
On Sat, Jul 25, 2009 at 4:05 PM, Tom Davis<t...@dislocatedday.com> wrote:
> No Tests - This seems like a project that needs good test coverage, given
> the importance of the API (bringing up servers, dealing with peoples' files,
> etc.)
I completely agree. Testing web services is pretty difficult, so if
you have any ideas on how to best tackle this, it would add a lot of
value to the project.
We've gotten some basic tests in the test/ directory:
http://github.com/cloudkick/libcloud/tree/bc52bca8dd79a77c3aa1c08bcdf337cba1bfef70/test
Note, there is more work to do here, but the framework is there so you
should be able to TDD your heart out. :)
python setup.py test, to run them
> If you haven't finalized the basic API that's totally fine, e.g. only have
> `list_nodes` and `get_uuid` or whatever, but it seems like right now there's
> no way to develop this library in a distributed fashion without ending up
> with completely conflicting APIs, unless you define some kind of "master
> driver" that stays ahead of the others, but that's silly. Have you looked
> into zope.interface (http://pypi.python.org/pypi/zope.interface)?
Definitely have thought about using the zope.interface stuff, however
I was trying to keep this pure python ... i.e. no external library
dependencies (for python>=2.5). Although, may have to already break
that for JSON support, we'll see.
The plan is to create a "BaseDriver" class which implements the
functions of the API, and each throw "NotImplementedExceptions". From
there, the libraries would inherent from that. Do you think this
satisfies the issue you brought up? I'm planning on adding this soon.
Again, thanks for the feedback.
-Alex
--
co-founder, cloudkick.com
twitter.com/cloudkick
541 231 0624
I completely agree. Testing web services is pretty difficult, so if
you have any ideas on how to best tackle this, it would add a lot of
value to the project.
class BaseProvider(object):
implements(IBaseProvider)
clientCls = libcloud.client.HttpClient
Definitely have thought about using the zope.interface stuff, however
I was trying to keep this pure python ... i.e. no external library
dependencies (for python>=2.5). Although, may have to already break
that for JSON support, we'll see.
Tada! http://build.libcloud.org/waterfall
I'll happily give access to folks after they have contributed a few
patches / gained some level of trust. You can setup github to do a
post push hook, which will cause buildbot to run the test suite
against your tree. Pretty slick! Ping me offlist or freenode
(#cloudkick) if you're interested in getting your repo setup.
-Alex