[01:48] *** bcarlyon|ubuntu_ has joined #kamaelia
[06:39] < Lawouach_> morning folks
[07:31] *** mhrd has joined #kamaelia
[07:32] *** mhrd forgot to mention - am away yesterday/today/tomorrow (project meetings abroad)
[07:32] *** mhrd shocked at the sudden deluge of commits :-)
[07:32] < mhrd> I'll loiter here a little while, but'll have to go in a bit
[07:59] *** bcarlyon|laptop has joined #kamaelia
[08:24] *** orphans has joined #kamaelia
[08:25] *** vmlemon_ has joined #kamaelia
[08:26] *** vmlemon_ has joined #kamaelia
[08:30] *** PJ_Coudert has joined #kamaelia
[08:53] *** Chong- has joined #kamaelia
[09:04] *** mhrd has parted #kamaelia
[09:06] *** Uraeus has joined #kamaelia
[09:12] < ms-afk> "mhrd shocked at the sudden deluge of commits"
[09:12] < ms-afk> -- caused by commits at the weekend, but no emails being sent by sourceforge. Looks like they had mailing list constipation
[09:14] *** bcarlyon|laptop has parted #kamaelia
[09:15] < orphans> there's a lovely image to start the day with :)
[09:30] *** bcarlyon|laptop has joined #kamaelia
[09:53] *** Davbo has joined #kamaelia
[10:13] *** Uraeus has joined #kamaelia
[10:40] *** bcarlyon|laptop has joined #kamaelia
[10:41] *** bcarlyon|laptop has parted #kamaelia
[10:55] < Davbo> ms-afk: I can't get the Logger to connect to another server anymore
[10:55] < Davbo> not sure if it's just a problem on my end
[10:55] < Davbo> other than that it seems fine for merge, what do you think. Shall I merge?
[10:56] < Davbo> I mailed the Mailing List about it but it hasn't shown up for some reason
[11:24] < ms-afk> What server are you trying to connect to>
[11:24] < ms-afk> ?
[11:24] < vmlemon> Hi
[11:28] < Davbo> Sorry ms-afk!
[11:28] < Davbo> i've got it connected to irc.quakenet.org but it didn't join the channel
[11:28] < vmlemon> Aaw, http://gizmodo.com/assets/images/gizmodo/2008/06/SnowLeopard3.jpg
[11:31] < Davbo> I thought it might be because IRCClient uses this format
[11:31] < Davbo> print "/user testingkbot irc.freenode.net 127.0.0.1 username"
[11:31] < Davbo> but the logger is doing
[11:31] < Davbo> self.send(("USER", self.name, self.name, self.name, self.name), "irc")
[11:31] < Davbo> I was just about to look into that for a solution
[11:53] < Davbo> Meh, works on EFNet
[11:54] < Davbo> Changed it so you can put host in the config file though
[11:55] < Davbo> maybe that quakenet server was unorthodox
[12:48] < Davbo> Could someone help me merge when they've got time please
[12:48] < Davbo> I don't want to break svn
[12:56] < ms-afk> If you've made changes, you ought to do a
[12:56] < ms-afk> svn diff -r< last version you didn't change>: HEAD .
[12:56] < ms-afk> summarise the changes you've made and post those changes, along with the diff line (with the right version number) to the list
[12:57] < ms-afk> Along with any observations on the rest of the code :)
[12:57] < ms-afk> It's worth bearing in mind though
[12:57] < ms-afk> That svn merge doesn't automatically check in, so you can only break your own repository
[12:57] < ms-afk> If you're worried about that,
[12:57] < ms-afk> cp -R /trunk /trunk.backup.just.in.case
[12:58] < Davbo> I was trying to do that ms-afk but I get a huge diff with things i didn't change
[12:58] < ms-afk> Where are you doing this:
[12:58] < ms-afk> svn diff -r< last version you didn't change>: HEAD .
[12:59] < ms-afk> If you're doing it on the branch, then it should be fine
[12:59] < ms-afk> (should)
[12:59] < ms-afk> (ie short)
[12:59] < ms-afk> ie really need
[12:59] < ms-afk> ~/kamaelia/branches/private_MPS_Scratch> pwd
[12:59] < ms-afk> /home/michael/kamaelia/branches/private_MPS_Scratch
[12:59] < Davbo> pj
[13:00] < Davbo> oh*
[13:00] < ms-afk> and that sort of detail (pastebin is your friend)
[13:01] < ms-afk> After all, if "I was trying to do < thing> but I get < other thing>", really need to be able to "see" what you're doing when you do < thing>
[13:01] < Davbo> [root@localhost private_MPS_KamaeliaLogger]# svn update
[13:01] < Davbo> At revision 4337.
[13:01] < Davbo> [root@localhost private_MPS_KamaeliaLogger]# svn diff -r4337:HEAD
[13:01] < ms-afk> and see results
[13:01] < Davbo> I'm totally doing this wrong aren't i
[13:01] < ms-afk> ta
[13:01] < ms-afk> not necessarily :-)
[13:01] < Davbo> it's empty
[13:01] < ms-afk> Yes, that is.
[13:01] < ms-afk> The reason is because "HEAD" is a special version
[13:02] < ms-afk> it means "the current last revision for this branch"
[13:02] < ms-afk> Since "At revision 4337."
[13:02] < ms-afk> that means you're doing
[13:02] < ms-afk> svn diff -r4337:4337
[13:02] < Davbo> oh.
[13:02] < ms-afk> which is asking for the diff between 2 versions which are the same :)
[13:02] < Davbo> i see lol
[13:02] < ms-afk> so the diff should be empty
[13:02] < Davbo> How do i see what revision it was before I changed anything?
[13:02] < ms-afk> hold on
[13:03] < ms-afk> ~/kamaelia/branches/private_MPS_KamaeliaLogger> svn update
[13:03] < ms-afk> U Apps/Kamaelia-Logger/App/KamaeliaLogger.py
[13:03] < ms-afk> U Apps/Kamaelia-Logger/Config/kamaelia_logger.conf.dist
[13:03] < ms-afk> U Apps/Kamaelia-Logger/Doc/README
[13:03] < ms-afk> Updated to revision 4337.
[13:03] < ms-afk> ~/kamaelia/branches/private_MPS_KamaeliaLogger> svn log --stop-on-copy
[13:03] *** ms-afk reads through that
[13:03] < ms-afk> To make clearer what I'm looking at:
[13:04] < ms-afk> ~/kamaelia/branches/private_MPS_KamaeliaLogger> svn log --stop-on-copy|grep ^r
[13:04] < Davbo> oh i see
[13:04] < ms-afk> r4335 | davbo | 2008-06-10 13:36:43 +0100 (Tue, 10 Jun 2008) | 1 line
[13:04] < ms-afk> r4334 | davbo | 2008-06-10 13:34:52 +0100 (Tue, 10 Jun 2008) | 1 line
[13:04] < ms-afk> r4333 | davbo | 2008-06-10 13:20:16 +0100 (Tue, 10 Jun 2008) | 1 line
[13:04] < ms-afk> r4332 | davbo | 2008-06-10 13:15:51 +0100 (Tue, 10 Jun 2008) | 1 line
[13:04] < ms-afk> r4313 | davbo | 2008-06-09 17:56:38 +0100 (Mon, 09 Jun 2008) | 1 line
[13:04] < ms-afk> r4312 | davbo | 2008-06-09 14:59:38 +0100 (Mon, 09 Jun 2008) | 1 line
[13:04] < ms-afk> r4255 | ms_ | 2008-06-08 21:38:24 +0100 (Sun, 08 Jun 2008) | 4 lines
[13:04] < Davbo> yeah
[13:04] < ms-afk> So the last version you didn't change was r4255
[13:04] < Davbo> yep
[13:04] < ms-afk> ~/kamaelia/branches/private_MPS_KamaeliaLogger> svn diff -r4255:HEAD
[13:04] < ms-afk> Is what you've been doing :-)
[13:05] < Davbo> thank you ms-afk
[13:05] < Davbo> I'll write this up on to the mailing list
[13:05] < ms-afk> It's *really* handy if someone says "what have you done to this branch" ;-) :-D
[13:05] < ms-afk> Please do write it up - I (like others) have many hidden assumptions
[13:06] < ms-afk> Lines that look like this:
[13:06] < ms-afk> @@ -156,6 +156,7 @@
[13:06] < ms-afk> Show specific changes, which can be really useful for summarising what's going on
[13:07] < ms-afk> eg:
[13:07] < ms-afk> +++ Apps/Kamaelia-Logger/App/KamaeliaLogger.py (revision 4337)
[13:07] < ms-afk> @@ -156,6 +156,7 @@
[13:07] < ms-afk> yield 1
[13:07] < ms-afk> while True:
[13:07] < ms-afk> + time.sleep(0.1) # better way to do this?
[13:07] < ms-afk> if self.currentDateString() != self.lastdatestring:
[13:07] < ms-afk> self.changeDate()
[13:07] < Davbo> Right
[13:07] < ms-afk> The question is what is that doing?
[13:07] < ms-afk> etc :)
[13:08] *** Trun has joined #kamaelia
[13:11] < Davbo> oh one question ms-afk
[13:11] < ms-afk> ?
[13:11] < Davbo> I thought it would be better for the user to see the default's the bot took, so i uncommented them in the config file, so those values are taken by default over the hardcoded ones.
[13:12] < Davbo> i thought a user might wonder why it connected to freenode if the config was all commented out
[13:13] < ms-afk> Trun: Your checkin messages should be proportional to the size of change
[13:13] < ms-afk> * Refactored KamTestCase (it does not inherit unittest.TestCase anymore but still delegates everything on it)
[13:13] < ms-afk> * KamMockObject is now "private" for the user
[13:13] < ms-afk> * More tests added, a couple of bugfixes
[13:13] < ms-afk> Doesn't really actually assist in following what you are working on
[13:14] < Davbo> you'll see what i mean with the diff ms-afk
[13:14] < ms-afk> Davbo: Ta :)
[13:14] < Davbo> :)
[13:14] < Trun> hmm... you mean by more doc in the messages or you mean by shorter commits?
[13:15] < ms-afk> More commite more often which are smaller
[13:15] < Trun> ok, sorry for that
[13:15] < ms-afk> Let me put it this way
[13:15] < ms-afk> r4158 | nctrun | 2008-06-03 02:19:11 +0100 (Tue, 03 Jun 2008) | 7 lines
[13:15] < ms-afk> r4100 | nctrun | 2008-05-29 02:17:35 +0100 (Thu, 29 May 2008) | 6 lines
[13:15] < ms-afk> r4075 | nctrun | 2008-05-27 01:57:35 +0100 (Tue, 27 May 2008) | 5 lines
[13:15] < ms-afk> r4053 | nctrun | 2008-05-24 20:46:17 +0100 (Sat, 24 May 2008) | 3 lines
[13:16] < ms-afk> gah
[13:17] < ms-afk> r4338 | nctrun | 2008-06-10 14:12:16 +0100 (Tue, 10 Jun 2008) | 5 lines
[13:17] < ms-afk> r4191 | nctrun | 2008-06-05 15:33:40 +0100 (Thu, 05 Jun 2008) | 8 lines
[13:17] < ms-afk> r4185 | nctrun | 2008-06-05 03:17:25 +0100 (Thu, 05 Jun 2008) | 4 lines
[13:17] < ms-afk> r4158 | nctrun | 2008-06-03 02:19:11 +0100 (Tue, 03 Jun 2008) | 7 lines
[13:17] < ms-afk> r4100 | nctrun | 2008-05-29 02:17:35 +0100 (Thu, 29 May 2008) | 6 lines
[13:17] < ms-afk> The gaps between those checkins are very large
[13:17] < ms-afk> generally speaking
[13:17] < ms-afk> So between:
[13:17] < ms-afk> r4338 | nctrun | 2008-06-10 14:12:16 +0100 (Tue, 10 Jun 2008) | 5 lines
[13:17] < ms-afk> r4191 | nctrun | 2008-06-05 15:33:40 +0100 (Thu, 05 Jun 2008) |
[13:17] < ms-afk> You've got 1 line of summarising what you're doing per day of work
[13:18] < ms-afk> It's *impossible* to keep track of what you're doing if you only communicate 1 line of information for an entire day's work
[13:18] < ms-afk> (which is a huge shame because you're doing lots :) )
[13:18] < ms-afk> * More tests added, a couple of bugfixes
[13:19] < ms-afk> is actually quite bad as well - what tests? What bugs were fixed?
[13:19] < ms-afk> If you fix a bug, it should get checked in
[13:19] < ms-afk> Compare my checkin log:
[13:19] < ms-afk> http://cia.vc/stats/author/ms_
[13:20] < ms-afk> You can see quite clearly what's changing
[13:20] < Trun> yeah, I see
[13:21] < Trun> "If you fix a bug, it should get checked in" -> commit then as the bug is fixed, with explanation of the bug?
[13:21] < ms-afk> definitely
[13:21] < ms-afk> even a one line explanation :-)
[13:21] < Trun> ok :-)
[13:21] < ms-afk> svn ci filename.py -m "fixed missing comma, which destroys your filesystem if missing"
[13:22] *** ms-afk wonders
[13:23] *** ms-afk tries somethings
[13:27] < ms-afk> (sorry was interrupted)
[13:28] < ms-afk> OK, if there's a problem due to language, then this is works:
[13:28] < ms-afk> http://translate.google.com/translate?u=http%3A%2F%2Fcia.vc%2Fstats%2Fauthor%2Fms_&hl=en&ie=UTF8&sl=es&tl=en
[13:28] < ms-afk> which means that if you find it quicker, you can checkin in spanish.
[13:28] < ms-afk> BUT:
[13:28] < ms-afk> and its a huge but
[13:29] < ms-afk> If you DO do that, please ensure that you post that english language version to EITHER the commits mailing list
[13:29] < ms-afk> or to the google group
[13:29] < ms-afk> *before* you hit 20 versions
[13:29] < ms-afk> Preferably with just the check in messages !
[13:29] < ms-afk> and details
[13:30] < Trun> mmm... I think that I prefer to keep checking in in english, I'll place more efforts on writing the message
[13:31] < ms-afk> I'd prefer it too - mainly because I'd be utterly hopeless without that auto-translater
[13:31] < ms-afk> :)
[13:31] < Trun> yeah, I know that my english is not very good :-) but I'll try to place more effort on the checkins
[13:32] < ms-afk> Thank you :)
[13:33] < ms-afk> It's worth remembering that as well as the checkin emails, that due to the cia.vc site, it's possible for someone to see what you're doing more clearly
[13:33] < Davbo> my diff is up on the mailing list ms-afk
[13:33] < Davbo> (no rush or anything, just letting you know)
[13:33] < ms-afk> Davbo: ta
[13:35] < ms-afk> Trun: So, can you give me a bit more detail than just the 8 bullet points as to what you've been doing?
[13:35] < ms-afk> In case you're wondering why I ask, let me translate your checkin messages into "trying to track what's going on ese"
[13:35] < ms-afk> (inteneded to be slightly humourous translation)
[13:36] < Trun> sure, you mean now? (want to use #kamaelia-mentor ?)
[13:36] < ms-afk> Changed code in < some file> (but not how or why)
[13:37] < ms-afk> [ yes, now (after I show you how your check messages read) ]
[13:37] < Trun> [ ok ]
[13:37] < ms-afk> < code> is now "private" for the user (what does this actually mean in practice? How is it private ? Why is it private even ? )
[13:37] < ms-afk> More tests added, a couple of bugfixes -> "I wrote code, but you'll have to rummage to find out what"
[13:38] < ms-afk> "Added libraries to KamPlanet's "libs" folder to make it far easier to run the application" --> "I added more code, but not saying what"
[13:39] < ms-afk> "Added "libraries.py" to import these libraries, runTests, KamPlanet.py and runSingleTest use it" --> Um, that's just (almost literally) "I added some code. I'm not saying what it does though"
[13:39] < ms-afk> "Migrated from pmock to the "Python Mocker" module (http://labix.org/mocker) ** Reason: pmock is available in repositories (such as ubuntu or debian), but it will be incompatible with Python 2.6 & py3k.
[13:39] < ms-afk> Contacted the author and he confirmed that it's not going to be maintained anymore :-( ** Little class that added a feature to pmock removed since "Python Mocker" already supports it"
[13:39] < ms-afk> That's something that should be discussed on the list
[13:39] < ms-afk> (no machine I use uses ubuntu or debian)
[13:40] < ms-afk> (also it becomes a barrier to using your code, so needs discussion really)
[13:40] < ms-afk> "Adding more test all over KamPlanet (most units already have tests, although they still don't test every situation)"
[13:40] < ms-afk> --> "I wrote lots of code. "
[13:40] < ms-afk> "Changes in KamMockObject and KamTestCase, method renaming and more features" --> "I changed some things"
[13:41] < ms-afk> Now, that's meant lightheartedly
[13:41] < ms-afk> But
[13:41] < ms-afk> That means your checkin messages say this to me:
[13:43] < ms-afk> Changed code in < some file> (but not how or why)
[13:43] < ms-afk> < code> is now "private" for the user
[13:43] < ms-afk> I wrote code, but you'll have to rummage to find out what
[13:43] < ms-afk> I added more code, but not saying what"
[13:43] < ms-afk> I added some code. I'm not saying what it does
[13:43] < ms-afk> < discussion of something that should be on IRC or the mailing list - probably the latter>
[13:43] < ms-afk> "I wrote lots of code. "
[13:43] < ms-afk> "I changed some things"
[13:43] < ms-afk> Which is not really that easy to follow
[13:43] < ms-afk> Trun: You see ?
[13:43] < ms-afk> :)
[13:43] < Trun> yeah, definetely, I see
[13:43] < Trun> s/definetely/definitely/ :-)
[13:44] < ms-afk> It's a really nasty danger that people fall into with checkin messages - they don't state specifically what they've changed, merged, fixed, broken, etc
[13:45] < ms-afk> The other thing is did you get my email saturday?
[13:45] < Trun> yeah... it's definitely a bad habit I have :-) sorry for that
[13:45] < Trun> yeah
[13:46] < Trun> I understand it and accept it
[13:46] < ms-afk> OK, simply telling me that would've helped btw :)
[13:46] < ms-afk> I've currently got no idea if your code / approach/ideas will fit in with the current testing & logging frameworks that we use
[13:47] < ms-afk> or those that check nightly for problems, or rebuild docs etc
[13:47] < ms-afk> since you've not really discussed your ideas on the list
[13:49] < Trun> yeah, I guess I should have written about it some time ago, may I tell now [here]?
[13:49] < ms-afk> yes, also, for information:
[13:50] < ms-afk> ~/kamaelia/trunk/Tests/Python/Axon> for i in test*py; do echo $i; echo $i|sed -e "s/./=/g"; ./$i -v; done
[13:50] < ms-afk> That'll run the Axon test suite and document what works.
[13:51] < ms-afk> (go on)
[13:52] < ms-afk> (14:41:38) Trun: sure, you mean now? (want to use #kamaelia-mentor ?)
[13:52] < ms-afk> (14:42:23) ms-afk: [ yes, now (after I show you how your check messages read) ]
[13:52] < ms-afk> (14:42:43) Trun: [ ok ]
[13:52] < ms-afk> (14:54:26) Trun: yeah, I guess I should have written about it some time ago, may I tell now [here]?
[13:52] < ms-afk> (14:55:15) ms-afk: yes
[13:52] < ms-afk> (14:57:16) ms-afk: (go on)
[13:52] < ms-afk> Please don't ask for permission to talk about what your project is
[13:53] < ms-afk> If you don't get an answer posting the same thing to the list is appreciated
[13:53] < ms-afk> OK
[13:53] < Trun> ok, I go
[13:54] < Trun> well, on the one comment about debian/ubuntu in the checkin, I just wanted to mean that it might not be so easily found installed. Ubuntu and debian were just "examples"
[13:55] < ms-afk> Anyway, I'll be quiet and listen
[13:56] < Trun> well, I don't know pretty well how to start talking about it
[13:56] < Trun> the main class in the testing framework is the KamTestCase class
[13:57] < ms-afk> "well, I don't know pretty well how to start talking about it" - talk high level then
[13:57] < Trun> that I have changed several times and I still don't think it has an "stable api" or sth like that
[13:57] < ms-afk> then go into detail
[13:57] < Trun> ok
[13:58] < Trun> the idea is to have a class (KamTestCase) that "runs kamaelia" in each test, and stops it at the end
[13:58] < ms-afk> Not surprised that there isn't a stable API yet - I sort of expect that for the first 1/2 of GSOC you'll be doing exploratory work, and the second half doing stuff that actually tightens it up
[13:58] < ms-afk> k
[13:59] < Trun> the main problem is that if a test actually fails, it can go into an endless loop
[13:59] < Trun> (a test that is testing a Axon.Component.component )
[13:59] < ms-afk> Correct
[13:59] < Trun> while this can happen in other common tests, this is specially easy in kamaelia
[14:00] *** ms-afk nods
[14:00] < ms-afk> 2 suggestions then
[14:00] < ms-afk> 1) use my branch (private_MPS_Scratch) - that has a formal version of what you're trying to do here:
[14:00] < ms-afk> self._graph.__class__.schedulerClass.run = None
[14:00] < ms-afk> self._graph.__class__.schedulerClass()
[14:01] < ms-afk> 2) Use LikeFile (again perhaps the one in my /Sketches/MPS area)
[14:01] < ms-afk> to run systems
[14:01] < ms-afk> since then you're still left in control of the system
[14:01] < ms-afk> (That is actually a crutch, but it may help initially)
[14:02] < Trun> yeah, I used that first approach (right now it is the clearThread method at KamTestCase)
[14:02] < ms-afk> "self._graph.__class__.schedulerClass.run = None" is copied and pasted from your code
[14:03] < Trun> oh
[14:03] < ms-afk> In https://kamaelia.svn.sourceforge.net/svnroot/kamaelia/trunk/Sketches/MPS/pprocess/MultiPipeline.py
[14:03] < ms-afk> I do this:
[14:03] < ms-afk> background(zap=True).start()
[14:04] < ms-afk> Which starts a background scheduler & zaps the current scheduler state
[14:04] < Trun> oh, I see
[14:04] < ms-afk> (this is necesarry for reasons irrelevant here)
[14:04] < ms-afk> But "zap=True" relies on code in my branch
[14:04] < ms-afk> (it'll get merged soon enough)
[14:05] < ms-afk> Anyway, please continue
[14:06] < Trun> anyway, if you run a background scheduler, the problem of knowing if the system has finished or not still continues, right?
[14:06] < Trun> i mena
[14:06] < ms-afk> Depends if that is a test you're making
[14:06] < ms-afk> But it is then something you can test
[14:06] < Trun> I mean, right now I assert that "if in N steps the system hasn't finished, this is a bug"
[14:06] < ms-afk> and if it takes too long, you can exit the test
[14:07] < ms-afk> Since the scheduler runs in the background you can also query it's current run queues etc
[14:07] < Trun> but I don't know what should be "N", or how long something should take to know if it is a bug
[14:08] < ms-afk> This isn't necessarily threadsafe, BUT the snapshot could be useful
[14:08] < Trun> yeah, yeah, that code in LikeFile definitely is really useful for the testing framework (thanks!)
[14:08] < ms-afk> I think rather than "N" it should be time based
[14:09] < Trun> why time based?
[14:09] < Trun> I assumed that it would be based on "steps" to ensure that it will run the same expectations in any machine
[14:09] < ms-afk> You'll want to use likefile from here: /home/zathras/kamaelia/trunk/Sketches/MPS/Experiments/Likefile2/likefile
[14:10] < ms-afk> OK, time based or "steps" based
[14:10] < ms-afk> You also can't assume that "steps" will be the same on any machine either
[14:10] < ms-afk> especially if the component under test is actually process based - then the number of steps taken will vary with the number of CPUs
[14:11] < ms-afk> time based in terms of "if a test that should take nano-seconds or microsends takes 10 seconds, it's broken"
[14:12] < Trun> ok, for example there, it's normal to assume the user to provide that number (10 seconds), right?
[14:12] < ms-afk> they will know their code
[14:12] < Trun> ok
[14:12] < ms-afk> https://kamaelia.svn.sourceforge.net/svnroot/kamaelia/trunk/Sketches/MPS/GSOC08/MultiPipeTest.py
[14:12] < ms-afk> contains lots of "expect" style tests as well
[14:13] < ms-afk> which is a form of test I don't know if you're planning on automating & making re-runnable
[14:13] < Trun> I see
[14:14] < ms-afk> https://kamaelia.svn.sourceforge.net/svnroot/kamaelia/trunk/Sketches/MPS/Experiments/Likefile2/likefile/TestLikeFile.py - is again, effectively a manual test harness.
[14:14] < ms-afk> which is another type of problem to automate
[14:15] < Trun> I see
[14:16] *** Trun takes note :-)
[14:16] < ms-afk> You've also not (yet :-) ) related what you're doing to the tests in /trunk/Tests/Python/Axon /trunk/Tests/Python/Kamaelia , /trunk/Code/Python/Kamaelia/Test/
[14:17] < Trun> I read some of them on Friday (I didn't notice that the comments were later used in the doc until you said on saturday, though)
[14:18] < ms-afk> It's also probably worth noting that some tests have been broken by changes in the core of Axon itself
[14:18] < ms-afk> rather than the code being broken
[14:18] < ms-afk> for example:
[14:18] < ms-afk> https://kamaelia.svn.sourceforge.net/svnroot/kamaelia/trunk/Code/Python/Kamaelia/Test/Protocol/test_framing.py
[14:18] < ms-afk> now fails because it does things like:
[14:19] < ms-afk> for chunk in chunks:
[14:19] < ms-afk> system._deliver(chunk, "inbox")
[14:19] < ms-afk> and expects similarly
[14:19] < ms-afk> chunk = system._collect("outbox")
[14:19] < ms-afk> to exist
[14:19] < ms-afk> But it fails because it uses private methods to Axon which no longer actually exist
[14:20] < ms-afk> That particular test suite is perhaps the most useful here actually
[14:20] < ms-afk> partly because it shows how the scheduler can be run manually for a limited number of steps
[14:21] < ms-afk> which is similar to backgrounding
[14:21] < ms-afk> OK, I think I'm going to suggest you post to the mailing list
[14:21] < ms-afk> since you're not actually saying what you're doing
[14:22] < Trun> oh
[14:22] < Trun> you want an e-mail with what I'm doing exactly?
[14:25] < ms-afk> I can't mentor you if you don't communicate what you're doing
[14:25] < ms-afk> If you're not going to communicate what you're doing, no one will use your test suite
[14:25] < ms-afk> please start making it clear what you're up to
[14:25] < ms-afk> Start with a high level view and get more detailed from there
[14:25] < ms-afk> work from what you already have, but also where you want to go
[14:25] < Trun> I was reading what you had pointed out (I was recalling having used the _deliver method, but I see that it's in my misc folder, not in the test framework itself)
[14:25] < Trun> ok
[14:26] < Trun> currently the KamTestCase is the class that the user would use
[14:26] < Trun> you can (now) override the setUp and tearDown methods, write tests as if it was a unittest.TestCase instance
[14:27] < Trun> and there is a classmethod that provides a dynamically generated class that subclasses unittest.TestCase
[14:27] < Trun> this way, unittest test runners can run these tests
[14:27] < Trun> def suite():
[14:27] < Trun> return KamTestCase.TestSuite((
[14:27] < Trun> KamTestCase.makeSuite(FeedParserTestCase.getTestCase()),
[14:27] < Trun> KamTestCase.makeSuite(FeedParserFactoryTestCase.getTestCase()),
[14:27] < Trun> ))
[14:28] < Trun> (where KamTestCase.TestSuite = unittest.TestSuite and KamTestCase.makeSuite = unittest.TestSuite )
[14:28] < Trun> right now, the user that writes a test method, has two auxiliar attributes:
[14:28] < Trun> messageAdder and messageStorer, which are kamaelia components that send and receive messages to/from the component under test
[14:29] < Trun> these two components are created whenever the user calls a KamTestCase method called "initializeSystem"
[14:30] < Trun> in this method, the user says "I want to test this component", and KamTestCase will generate the messageAdder and messageStorer that will have the required inboxes/outboxes
[14:31] < Trun> ok, so what the user is expected to do is: setting up the environment through the setUp method (as usually)
[14:31] < Trun> call at some time the initializeSystem method
[14:31] < Trun> provide messages to be added to the component inboxes (you can also add "yields" between message and message)
[14:32] < Trun> and run the system (currently during a certain number of "steps")
[14:33] < Trun> if you expect it to finish, you call the self.assertStopping() method, if you expect it to not finish, you call the self.assertNotStopping() method
[14:33] < Trun> after that, you retrieve the messages stored in the messageStorer component, and check that the results are the expected ones
[14:34] < Trun> in order to avoid "problematic" components (those accessing disk/network/etc.) in tests, I have started a "KamMockObject"
[14:34] < Trun> you create it through an inherited KamTestCase method: self.createMock(whatever)
[14:35] < Trun> being whatever a component
[14:35] < Trun> the returned component will have the same public inboxes and outboxes that "whatever" has
[14:36] < Trun> and you can add messages that it will send (again, you can force a number of yields between message and message)
[14:36] < Trun> and check what messages it has stored
[14:36] < Trun> the user is not expected to create instances of this class directly, but through the self.createMock due to some "optimizations"
[14:37] < Trun> the idea is that the KamTestCase method that runs the system during "steps"/time can stop as soon as there is no more components running
[14:37] < Trun> and the KamMockObject objects shouldn't count
[14:38] < Trun> and I think that that's pretty all the infrastructure itself as it is right now
[14:40] < Trun> the rest of the code is just KamPlanet and testing KamPlanet to test the testing framework
[14:40] < Trun> for instance, until last commit, KamTestCase was actually a unittest.TestCase, so it could be run directly by the unittest runners
[14:41] < Trun> but I didn't find a way to allow the user to override the setUp and tearDown methods without having problems (KamTestCase needs to have its own initialize and finish method)
[14:43] < Trun> that's why there is now an "ugly" _AuxiliarTestCase class in the KamTestCase module, and a couple of new methods that dynamically generate the missing classes
[14:43] < Trun> (i.e. a class per KamTestCase, and all the assert* and fail* methods of unittest.TestCase are also added to KamTestCase)
[14:44] < Trun> do you want me to continue to a lower-level detail, or do you prefer information about KamPlanet?
[14:44] *** ms-afk notices that the lot is going in the channel after I specifically said to please post it to the list
[14:45] < ms-afk> (15:26:50) ms-afk: OK, I think I'm going to suggest you post to the mailing list
[14:45] < Trun> oh, sorry
[14:45] < ms-afk> I'd actually moved on to do other work, ignoring this window
[14:46] < Trun> after that you talked about communicating what I was doing I thought you meant "now", sorry for that :-S
[14:46] < ms-afk> After all, the time you can "guarantee" me being there is from 2pm til 3pm
[14:46] < ms-afk> not "all afternoon"
[14:46] < ms-afk> email *IS* communicating
[14:46] < ms-afk> sigh
[14:46] < Trun> yeah, sorry for that :-( I'll write the e-mail
[14:49] *** Uraeus_ has joined #kamaelia
[14:51] < Davbo> don't worry about it Trun just refactor it into an email
[14:53] < ms-afk> ++ Davbo
[14:53] *** j_baker has joined #kamaelia
[15:04] *** Davbo has joined #kamaelia
[15:08] < Davbo> let me know if there's anything else you'd like me to review ms-afk
[15:08] < Davbo> private_MPS_Tools2AppsConsolidation looks like it isn't claimed
[15:08] < ms-afk> That'd be a good one :)
[15:08] < Davbo> I'll do that tomorrow if you'd like
[15:08] < ms-afk> Cool
[15:08] < Davbo> i'll add to wiki
[15:09] < ms-afk> Try not to allow these reviews to get in the way of your project work (goes for everyone :-) ), but they are very much appreciated :)
[15:09] < ms-afk> And in many respects probably better experience ;)
[15:10] < Davbo> well closer to release i might not be able to help out as much as now
[15:10] < Davbo> so i'd like to get some done now
[15:10] < Davbo> :-)
[15:11] < Lawouach_> I got spam today, one was title: "Update your penis"
[15:12] < Lawouach_> They know my geek side.
[15:12] < Davbo> hah Lawouach_
[15:44] < Davbo> ms-afk: any idea's why i'm getting this error?
[15:44] < Davbo> TypeError: __init__() got an unexpected keyword argument 'zap'
[15:45] < Davbo> I can paste the rest for you if you like
[15:47] < Davbo> http://davbo.pastebin.com/m5c1dcda0
[16:02] < ms-afk> Oh
[16:02] < ms-afk> that
[16:03] < ms-afk> That's because you're not using the branch private_MPS_Scratch which contains that extra keyword
[16:03] < ms-afk> (specifically not using *axon* from that branch)
[16:06] < Davbo> Weird ms-afk, i've installed it and still get it
[16:07] < Davbo> (i had already installed it before asking, assuming that was the problem)
[16:14] *** j_baker has joined #kamaelia
[16:16] < ms-afk> really ?
[16:16] < ms-afk> can you check in your current code version
[16:16] < ms-afk> ?
[16:17] < Davbo> Yeah Sketches/DK/MagnaDoodle.py is popping the error
[16:18] < ms-afk> works here
[16:18] *** ms-afk did this:
[16:18] < ms-afk> ~>
[16:18] < ms-afk> ~> cd ~/kamaelia/branches/private_MPS_Scratch/Axon/
[16:18] < ms-afk> ~/kamaelia/branches/private_MPS_Scratch/Axon> sudo python setup.py --quiet install --force
[16:20] < Davbo> works
[16:20] < Davbo> thanks ms-afk
[16:20] < Davbo> :-)
[16:21] < Davbo> I was just doing regular install didn't know I had to force
[16:21] < j_baker> Oooooohhhh.... OS X 10.6 will have ZFS.
[16:21] < Davbo> I guess that means it overwrites it all?
[16:23] < Davbo> Heh j_baker :-) Yesterday I was "ooooo! the iPhone is going to be affordable in this country"
[16:23] < j_baker> Here too. $199 isn't bad.
[16:24] < Davbo> It was about $700 over here before + contract ended up being near $1800 ;/
[16:24] < Davbo> too much for a phone
[16:24] < j_baker> They charge you MORE for a contract?
[16:25] < Davbo> well that's for the entire duration of the contract
[16:25] < j_baker> Ah, I see. That's still expensive though.
[16:25] < Davbo> O2 are doing a Pay as you Go deal for the iPhone this time round
[16:25] < Davbo> not announced prices yet
[16:25] < j_baker> Really? Now THAT is cool.
[16:28] < Davbo> I guess AT&T don't do that?
[16:28] < j_baker> I don't believe so. I haven't checked though.
[16:30] < j_baker> I'm still happy with my Ming though
[16:30] < j_baker> http://www.motorola.com.hk/eng/motomobile/a/a1200/
[16:31] < Davbo> ah, thats a cool phone
[16:31] < j_baker> Yeah. Only problem is that it's GPRS only. No Edge or 3G. But I hardly ever use the internet on my phone anyway
[16:46] *** j_baker just spent 20 mins trying to figure out why the internet wasn't working on my desktop only to figure out the ethernet cord was unplugged.
[16:57] < Davbo> Imagine how long it would have took if you weren't so tech savy though :)
[16:57] < j_baker> lol... good point.
[16:57] < Davbo> you'd have took it to the Geek Squad ;-)
[16:58] < Davbo> or whatever they're called
[16:58] < j_baker> Thank god I know how to fix computers. I'm not particularly fond of dealing with technicians/salespeople who over charge you.
[17:04] *** Uraeus_ is now known as Uraeus
[17:45] *** vmlemon_ has joined #kamaelia
[17:46] < vmlemon_> Hi
[17:53] < ms-afk> hi
[18:01] < Lawouach> ms-afk: http://rafb.net/p/dLF2e392.html
[18:01] < Lawouach> the patch to remove trailing print statements in HTTP components
[18:01] < Lawouach> I can just commit it if you will
[18:01] *** vmlemon_ wonders if any tools for mining source code locally exist...
[18:02] < Lawouach> what do you mean by mining? what would you want to see?
[18:02] < ms-afk> Lawouach: (looking)
[18:03] < ms-afk> Ah, I see :)
[18:03] < ms-afk> If theyre already on a checkout of /trunk feel free to commit :)
[18:03] < vmlemon_> Essentially a keyword-based search engine of some sort that gets pointed to a set of directories and archive files
[18:04] < Lawouach> ms-afk: I've remove thf irst one because I had introduced it I think
[18:04] < Lawouach> The second one was already there
[18:04] < Lawouach> so I just commented out
[18:04] < vmlemon_> I'm sure something for general text or even HTML handling would be useful, though
[18:04] < ms-afk> I must admit, my preference is to comment out debugging info, rather than delete it
[18:04] < ms-afk> Until I'm sure it all works as intended for absolute certain that is :)
[18:05] < Lawouach> I can revert the first one locally and just comment it
[18:05] < ms-afk> Up to you - they're trivial - just talking personal preference
[18:05] < ms-afk> it's only 2 lines - hardly worth discussion :)
[18:06] < Lawouach> indeed
[18:06] < Lawouach> I'll comment both and commit then
[18:06] < ms-afk> ta :)
[18:06] *** j_baker has joined #kamaelia
[18:07] < vmlemon_> http://gonzui.sourceforge.net/ sounds like it might be useful for what I'm after
[18:08] < ms-afk> woo, it supports BF
[18:09] < j_baker> Hmmm... apparently the Minimal handler is REALLY vulnerable to DOS attacks.
[18:10] < ms-afk> ?
[18:10] *** bcarlyon|laptop has joined #kamaelia
[18:10] < vmlemon_> Except it doesn't appear to support searching zip/tar archives
[18:10] < ms-afk> j_baker: why do you say that?
[18:10] < j_baker> Well, I tried doing a little stress testing on your new server code.
[18:10] *** bcarlyon|laptop has parted #kamaelia
[18:11] < j_baker> And it gave me a too many files open error about 34% of the way through.
[18:11] < ms-afk> So that's a bug. It can be fixed :)
[18:12] < j_baker> And fairly easily I'm assuming. I would imagine that all we'd have to do is change the intelligent file reader to a max speed file reader.
[18:12] < j_baker> Either that or just open the file directly.
[18:15] < ms-afk> I don't actually know - I suspect that the problem is likely to be caused by files not actually being closed after being read to be honest
[18:15] < j_baker> That could also be the case. I don't recall seeing that code anywhere.
[18:16] < j_baker> Hey btw, were you aware that Kamaelia.Internet.TimeOutCSA doesn't have any documentation, ms-afk?
[18:16] < ms-afk> yeah, I suck
[18:16] < ms-afk> :)
[18:17] < j_baker> :)
[18:17] < ms-afk> It was written because I *really* needed it for K.Grey, but you're right it needs doc'ing
[18:17] < ms-afk> noting that as a blocker for merge is fine fwiw
[18:19] < ms-afk> j_baker: IFR doesn't actually close the file
[18:19] < ms-afk> That'll almost certainly be a problem
[18:19] < ms-afk> (It may not be the only one)
[18:19] < j_baker> Yeah. You're correct.
[18:24] *** ms-afk goes afk. Hopefully back later
[18:24] < ms-afk> (many thanks for taking this level of care BTW - it's very much appreciated!)
[18:25] < ms-afk> biab
[18:25] *** ms-afk has parted #kamaelia
[18:30] *** vmlemon has joined #kamaelia
[18:36] < vmlemon_> kamaeliabot: dance
[18:36] Reply: does the macarena
[19:43] *** j_baker_ has joined #kamaelia
[20:02] *** j_baker_ is now known as j_baker
[20:08] *** vmlemon has joined #kamaelia
[20:17] *** vmlemon_ has joined #kamaelia
[20:17] *** bcarlyon|laptop has joined #kamaelia
[20:24] *** vmlemon_ has joined #kamaelia
[21:37] *** Uraeus has joined #kamaelia
[21:48] < vmlemon_> Hah, http://cache.gizmodo.com/assets/resources/2008/04/psystarofficial.png
[22:27] *** vmlemon__ has joined #kamaelia
[22:27] *** vmlemon__ is now known as vmlemon_
[23:06] *** j_baker has joined #kamaelia