[sugar] review: Daf's view branch

2008-06-05 Thread Guillaume Desmottes
Just few comments:


+class ActivityViewHandler(object):
This class should have member_added and member_removed methods as its
dummy implementation in test_model. A FIXME would be enough for now.
We should probably have a properties_changed method too.



+self.activity_views = {}
A comment explaining the type of the keys and values would be good.


I think you're right, we could stop to support multi actions in queries
(as you already dropped them in views)


In test_model.py you have some: #self.assertEquals(42, context) that
could be removed.


Same for  #self.assertEquals([activity2], found_log.


What's your test.py hack? Didn't we already merge the one making error
message more informative?


Except that looks good. I like how you refactored query/view parsing
code and the general design of views.


G.

___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] review: Daf's view branch

2008-06-05 Thread Guillaume Desmottes
Le jeudi 05 juin 2008 à 12:40 +0200, Guillaume Desmottes a écrit :
> +class ActivityViewHandler(object):
> This class should have member_added and member_removed methods as its
> dummy implementation in test_model. A FIXME would be enough for now.
> We should probably have a properties_changed method too.

Btw, activity_found should also send activity properties and
participants.
I wrote protocol for activity added/removed:
http://wiki.laptop.org/go/XMPP_Component_Protocol#Added


G.

___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] review: Daf's view branch

2008-06-05 Thread Guillaume Desmottes
Le jeudi 05 juin 2008 à 12:58 +0200, Guillaume Desmottes a écrit :
> Le jeudi 05 juin 2008 à 12:40 +0200, Guillaume Desmottes a écrit :
> > +class ActivityViewHandler(object):
> > This class should have member_added and member_removed methods as its
> > dummy implementation in test_model. A FIXME would be enough for now.
> > We should probably have a properties_changed method too.
> 
> Btw, activity_found should also send activity properties and
> participants.
> I wrote protocol for activity added/removed:
> http://wiki.laptop.org/go/XMPP_Component_Protocol#Added
> 

... and each time we send buddies jid (in  as participants and
in  announcements) Gadget should include buddy properties if the
user doesn't already have an view with this buddy (as then he already
knows about his properties).


G.

___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar


Re: [sugar] review: Daf's view branch

2008-06-05 Thread Dafydd Harries
Ar 05/06/2008 am 12:40, ysgrifennodd Guillaume Desmottes:
> Just few comments:
> 
> 
> +class ActivityViewHandler(object):
> This class should have member_added and member_removed methods as its
> dummy implementation in test_model. A FIXME would be enough for now.
> We should probably have a properties_changed method too.

Agreed.

> +self.activity_views = {}
> A comment explaining the type of the keys and values would be good.
> 
> 
> I think you're right, we could stop to support multi actions in queries
> (as you already dropped them in views)

Ok.

> In test_model.py you have some: #self.assertEquals(42, context) that
> could be removed.

Oops, right.

> Same for  #self.assertEquals([activity2], found_log.
> 
> 
> What's your test.py hack? Didn't we already merge the one making error
> message more informative?

Hmm, I thought we had merged it too. Perhaps I made a mistake.

> Except that looks good. I like how you refactored query/view parsing
> code and the general design of views.

Thanks!

I think the main missing aspects are:

 - random views
 - correct view size handling
 - stress tests (I have some code lying around for older iterations of the
   model which we can probably use)

-- 
Dafydd
___
Sugar mailing list
Sugar@lists.laptop.org
http://lists.laptop.org/listinfo/sugar