IRC log of #schooltool for Sunday, 2006-02-19

*** jelkner has joined #schooltool00:57
*** jelkner has quit IRC00:57
*** pcardune has joined #schooltool02:19
*** pcardune has quit IRC05:34
*** jinty has quit IRC10:57
*** jelkner has joined #schooltool16:17
*** lhuynh has joined #schooltool16:59
jelknerlhuyng: good morning linda!17:00
jelkneryou're an hour early17:00
lhuynhwell, I have some homework to do, also17:00
jelknerme too17:00
lhuynhso I'll skulk around here until then17:00
jelknerok, let me not disturb you then...17:00
*** flint has joined #schooltool17:10
lhuynhflint :)17:10
flintlhuynh, hi there!!!17:10
jelknerlhuynh, flint, i just sent an email to david muffley about gasp.  i cc'd both of you17:11
jelknerflint: i created a lauchpad project for gasp17:12
jelknernow the trick will be to learn how to use it! ;-)17:12
jelkneri suggested to david that you might be able to help him with that17:12
lhuynhjelkner: we were supposed to do anything before
jelkneryou mean in timeclock?17:17
lhuynhnot sure17:17
lhuynhit says it can't import zope.schema17:17
jelknerwhat says?17:18
lhuynhwhen I "python" it17:18
jelknerback up a bit, are you working on timeclock?17:18
lhuynhi'm just looking it over17:18
jelknerare you logged into maddog?17:18
jelknerhold on then...17:19
jelknerlhuynh: let's go over this step-by-step17:21
jelkner1. can you start your zope instance with runzope?17:21
lhuynhhow would I do that?17:21
jelknerfrom your home directory, you'd type:  ./zope3/bin/runzope17:22
lhuynhwhat's supposed to happen?17:23
jelknerit worked17:23
jelkneryou should get some message about zope starting on port 808017:24
jelknerpoint your web browser to:
lhuynhit's loading17:25
jelknerahh yes, dial-up :-(17:26
lhuynha blank page shows up17:26
jelknerit shouldn't be blank17:27
jelknerit should be mostly blank17:27
lhuynhalright, I agree that is17:27
jelknerclick login17:27
jelkneron the upper right17:28
lhuynhand then i sign in17:28
lhuynhthe login changes to manager17:28
jelknerok, that's all you need to do with that for now... i just wanted to make sure your instance was setup and you could login... good17:29
lhuynhso this means I should be able to access zope.schema, right?17:30
jelknernow you should go over the lesson from last week:
flintelkner, got an x problem, be right back...17:30
*** flint has quit IRC17:30
lhuynhmy matches the most recent version17:30
jelknergo over this lesson from the beginning17:30
lhuynhhow would I quit onto the command line?17:33
* lhuynh grins17:34
tiredbonesjelkner, will all your classes be at this site?
jelknertiredbones: all of paul's zope3 classes will be on that site, yes17:35
jelknereventually we will move them to ibiblio17:36
tiredbonesjelkner, thanks17:36
jelknerbut only after the class is finished17:36
*** flint has joined #schooltool17:39
flintthere, I am back and a bit better organized....17:39
flintlhuynh, hey Good Morning LInda!17:40
lhuynhhello :)17:40
flintwhere the hell did Elkner go?17:40
* jelkner is working, and thus actively ignoring flint until he says something useful ;-)17:41
flintJust ignoring flint can be considered actual work.  Sadly you cannot get paid for ignoring flint, or I would do it myself... :^)17:42
* tiredbones bookmark17:43
jelkneryet ignoring flint does often "payoff", none the less...17:44
flintthe payoff of ignoring flint hm...  think if you ignore flint for long enough, you will DIE!!! :^)17:45
jelkneri've been looking for a good explaination of python's packaging mechanism, and strangly, most books/tutorials don't contain one17:47
*** pcardune has joined #schooltool17:47
jelknergood morning, teach!17:47
pcardunehi jelkner17:47
flintjeff what is the url of your work of last weeks dialogs?17:48
flintjeff thanks,  I had some "family issues" the last few days and have been living my life in "mph mode" eh?17:50
flintmph mode is where you stop measuring your lilfe in hours and switch to "miles per hour"...17:50
pcardunesoo... what do you guys think of the new intel macs?17:51
flintpcardune, there is an inherant evil in any monopoly... or we would not be here.17:52
flintpcardune, the evil in this one is dye heat.  ppc's are very interesting at a physical level.17:53
flintpcardune, I would avoid counting them out.  I myself have been spending time with the VIA Corefusion products, which you may know by the old name of Cyrix.17:54
flintpcardune, on another subject, can you help me get the logon right for "" ?17:55
flintpcardune, I am about to hack the principals.zcml file...17:55
pcardunehave you tried username:gandalf and password:123?17:55
flintpcardune, absolutely, try it yourself...17:56
pcardune  <principal17:56
pcardune    id="zope.sample_manager"17:56
pcardune    title="Sample Manager"17:56
pcardune    login="gandalf"17:56
pcardune    password="123"17:56
pcardune    />17:56
pcardunesomething like that should be in your principals.zcml file17:57
pcarduneso is everyone here?17:59
pcarduneof who is supposed to be here?17:59
lhuynhI'm awake17:59
flintI'm confused...17:59
jelknerwe are missing will and david woo18:00
jelknerrobbie will join us late18:00
flintpcardune, the ubuntu install allows you to set this password.  I finally got it.  There is no default.18:00
jelknerok, it is 11 am18:01
jelknertake it away pcardune!18:01
flintjelkner, Jeff's impersonation of Ed McMahon...18:01
pcarduneok, so i believe the place we left of with last week was having written the interfaces18:02
pcardunefor our Person object and its corresponding container18:02
pcardunewhat have we done with the configuration file?  anything?18:03
jelknerwhat configuration file?18:03
pcarduneok, nevermind... we will work with tests at the moment18:04
pcarduneSo, now is the perfect time in the XP way to write tests for our implementation of the IPerson interface18:04
flintpcardune, at the risk of annoying both you and Stephan, lets review some of the words and concepts you are throwing around here...18:04
pcardunesince we haven't written the implementation yet :)18:05
pcarduneflint: sure18:05
flintok, an interface is the first thing we wrote eh?18:05
flintan interface stores what it gathers in a container.18:05
pcardunean interface defines a "contract"18:06
flintthe container is related to a storage object oh yea the contract.18:06
flintok all i know about containers for certian is that they all begin with a capital "I" by convention.18:07
pcarduneall interfaces being with a capital I, and yet it is by convention18:07
jelknerok, teacher, let's go on18:09
flintImagine if you just wanted to get a freaking web site operational?  Would you not want to know something like website= browser, zcml, code, test, and btrieve?18:09
jelknerso, you were about to write a test18:10
jelkneri'm ready to see that18:10
flintjelkner, elkner please then explain the proper answer to the question website = !18:10
jelknerflint: just sit back and come along for the ride18:11
pcarduneflint: i'm going to say no you don't, unless you want to play with magic... in which case you can look at the "boring" product (it's actually called boring) for the simplest example of a product18:11
flintjelkner, most computer folks write books backwards, I want to build a timesheet product I do not care about tests.  the education process should explain why I should care about tests.18:11
jelknerwe care about tests because tests drive our code18:11
jelknerwe want code, so we need tests first18:11
jelknerlet's go18:11
pcardunein the XP fashion18:12
pcarduneok, anyways18:12
pcarduneso, everyone should create a file in their timeclock folder18:12
flintno, this dogmatic approach serves no one but the faithful.  richter creates tests and puts nothing in them.  lets go and do the exact same thing.18:12
jelknerok, i've got it18:13
pcarduneflint: that's what we are going to do18:13
pcarduneso, import the following classes:18:14
flintpcardune, I always a bit of a dicipline problem...18:14
pcardunethe primary way of doing unit tests nowadays is with what are called doctests18:14
pcardunethey serve as documentation and tests for your product18:15
pcardunenext, in your file add the functon18:15
jelkneris it dostestunit or doctestuint?18:15
pcardunedef setUp(test):18:16
pcardune    setup.placefulSetUp()18:16
pcardunenot doctestuint ;)18:16
pcarduneI will admit that setting up the file can be a b it like playing with magic at first18:17
pcardunei will explain in a moment what all this means18:17
pcardunenext, add the function:18:17
pcardunedef tearDown(test):18:17
pcardune    setup.placefulTearDown()18:17
flintpcardune, use majic in the context of something with meaning.  at this stage we do not know what we are testing or why... this is not right.18:17
pcarduneso, what we are going to test is our currently non-existant implementation of IPerson and IPersonContainer18:18
pcardune(the first tests should always fail to pass, if you are programming in the XP sense)18:18
pcardunerefer questions about XP to jelkner ;)18:18
jelkneris this a good time to check the file?18:19
pcardunejelkner: not yet18:19
flintthat is like refering questions about Christianaty to Christ :^)18:19
pcardunedef test_suite():18:19
pcardune    return unittest.TestSuite((18:19
pcardune        doctest.DocFileSuite('README.txt',18:19
pcardune                             setUp=setUp, tearDown=tearDown,18:19
pcardune                             globs={'pprint': doctestunit.pprint},18:19
pcardune                             optionflags=doctest.NORMALIZE_WHITESPACE|18:19
pcardune                                         doctest.ELLIPSIS),18:19
pcardune        ))18:19
pcarduneok, so once you have that in your file we can check it18:20
pcarduneyour file should have three functions: setUp, tearDown, test_suite18:20
pcardunedepending on how much experience all of you have with unittest, this idea of setUp and tearDown should be familiar18:20
pcarduneif you haven't had as much experience:  often with unittests we want to setup some kind of environment for the tests to run in18:21
pcardunesometimes this includes writing helper functions for the tests18:21
flintpcardune, what are you testing for?18:22
flintflint, syntax?  why not just run the program and allow python to find syntax errors?18:22
pcarduneflint: we are testing the implementation of IPerson18:22
pcardunewe are going to do that in with a doctests18:22
pcardunedoctests require some extra setup, which comes in test.py18:23
flintok, iperson is an interface with two objects eh?  (I am not trying to be dense this comes naturally :^)18:24
pcarduneat the moment I'm not going to get into what placefulSetUp and placefulTearDown does because it is a bit involved it will just make you confused18:24
pcarduneIPerson is an interface that defines a contract for two attributes18:24
flintpcardune, excellent! I would not want to be confused at this stage...18:25
pcarduneInterfaces do not have objects18:25
pcardunethey are a very abstract thing... it's like programming an idea18:25
flintpcardune, "IPerson is an interface that defines a contract for two attributes" thanks that I understand18:25
flintthus we are teseting this statement "IPerson is an interface that defines a contract for two attributes"18:26
pcarduneok, do looking at the test_suite function18:26
pcardunewe simply return a testsuite with a DocFileSuite object.  I'm going to be very brief on this... If you need to know more about how unittests work, you can look that up outside of class.  There are lots of great websites18:27
pcardunedon't worry about what the code means, just know that it will be useful for us18:28
pcardunefinally, write at the bottom of your file:18:28
flintpcardune, I do not mean to rattle you, as the teacher I am asking you for clarity.18:28
pcarduneif __name__ == '__main__':18:28
pcardune    unittest.main(default='test_suite')18:28
pcarduneflint: I know, thank you for asking even if others resent your questions ;)18:28
pcardunethis last part just makes it so we can type at the command prompt "python" and it will run our tests for us18:29
pcarduneit's important to understand that doesn't actually contain tests18:29
pcarduneand is not going to contain tests18:29
pcarduneit is simply a setup for doctests which reside in a totally separate file18:29
pcardunenow we will look at that file18:30
pcardunemake the file: README.txt18:30
jelkneris now a good time to check our file?18:30
pcardunejelkner: yes, and rename it to (so we all have the same thing)18:31
jelknerok, give me a minute to post it18:31
lhuynhthe 'README.txt' isn't the same one in the zope3 directory, right?18:32
pcarduneif you want an example of what a really good README.txt file looks like, you can look at src/zope/app/apidoc/README.txt18:33
flintlhuynh, linda I think we are supposed to be in the /home/zope/src directory...18:33
lhuynhreally? *was still in timeclock*18:33
pcarduneactually, we should be in timeclock18:34
flintlhuynh, linda I think we are supposed to be in the /home/zope/src/timeclock directory... my correction.18:34
jelkner$HOME/zope3/lib/python/timeclock is the directory18:35
pcardunejelkner: there is a problem with the <pre> tag... it does not show quote marks18:36
pcardunefor example, around README.txt18:36
jelknerhmm... let me deal with that later18:37
pcarduneif everyone reloads that page, i just added something at the bottom18:37
jelknerright now we want to create READM.txt in $HOME/zope3/lib/python/timeclock, yes?18:37
flintI suppose TESTME.txt would be too dam obvious..18:39
pcarduneflint: well, convention is you put the tests in README.txt because your tests should be written so well, that you should be able to read them like a book and figure out how stuff works18:40
flintpcardune, right... :^)18:41
jelknerok, if you run python now, it tells you it ran 0 tests.18:41
jelknerso what should our first test look like?18:42
pcarduneso, our first test can be creating a Person18:42
flintactually mine said "No module named zope.testing.doctest18:43
pcarduneSo, generally you would have documentation explaining the purpose of the Person object and so on and so forth18:43
pcardunewe will get right to the tests18:43
pcarduneflint: is zope in your python path?18:43
pcarduneso, after having written about the Person object, we write the tests18:45
pcardunethe great thing about doctests is that the tests look just like a python interpreter shell18:45
pcardunewhich means, to write the first test, start a new line, indent a few spaces, and write >>>18:46
pcarduneso our first line can be >>> from timeclock.person import Person18:46
jelknerinside a docstring, yes?18:47
jelkneror not18:47
lhuynhwe put the docstrings at the top/bottom of code?18:47
jelknerwe are editing an empty file name README.txt, what to we put in it?18:48
pcarduneThe TimeClock Application18:50
pcarduneThis application stores hours that people have worked18:50
pcarduneCreating Person Objects18:50
pcarduneA Person object stores information about a person who works18:50
pcardune  >>> from cando.virginia import interfaces, competency18:50
pcardunesomething like that18:50
pcarduneyou can use your own creativity with the sentances18:50
flintjelkner, jeff, I actually am using your good notes from last week.  but I am stuck.  if you go ahead you will loose me.18:50
jelknerflint: we need to go ahead18:51
jelkneri'll write them up again and this time, read them *during* the week!18:51
jelknerlhuynh: linda, how are you doing?18:52
tiredbonesjelkner, To do your assignment here does Cando need to be tunning?18:52
jelknertiredbones: no18:53
lhuynhI'm not sure if the commands are supposed to be put in docstrings at the top or bottom of the README.txt file18:53
jelknerin fact, paul's last line was a mistake18:53
jelknerwe are not doing cando here18:53
pcarduneoh yeah... woops that was a pretty big mistake18:53
flintI have done what you said in the tutorial and I am still coming up wrong.18:53
lhuynhflint: what are you getting? i want to see if I'm getting the same thing18:53
jelknerflint: i will help you with that tomorrow18:53
flintthanks for the support. Jeff.18:53
flintlhuynh, here ya go...18:54
flintroot@docbox:/home/zope/src/timeclock # python test.py18:54
flintTraceback (most recent call last):18:54
flint  File "", line 2, in ?18:54
flint    import zope.testing.doctest18:54
flintImportError: No module named zope.testing.doctest18:54
flintroot@docbox:/home/zope/src/timeclock #18:54
flintthe idea here is your tests suck.18:54
jelknerflint: this is what we talked about last week18:54
flintI did what we talked about last week.  want to see my damn .bashrc?18:55
jelkneryou didn't set your PYTHONPATH18:55
flintI even tried to put the line in the code itself18:55
pcardunelhuynh: the README.txt file is one big doctest, and it doesn't matter where you put the actual commands18:55
flintI specifically put the PYTHONPATH in my bashrc.18:55
flintthat is not the way to make this stuff work.  I suspect that because I have shelled to root your damn code does not work!!!!~18:56
tiredbonesflint, to check import sys, then sys.path.18:56
jelknershould say: export PYTHONPATH=/usr/local/src/Zope3/src:$HOME/zope3/lib/python18:56
jelknerflint: you need to deal with this *before* class.18:56
jelknerwe need to make progress today18:57
flinttiredbones, AH! at last a test i can understand!!!!!18:57
flintjelkner, no jeff we need to learn.18:57
jelknerflint: by not doing your homework, you hold the whole process up18:57
jelknerthat's not fair to the rest of us18:57
flintjelkner, I did my homework as assigned that is not correct. now fix the problem not the blame.18:58
*** wrobel has joined #schooltool18:58
tiredbonesjelkner, Is this a class in some college?18:58
pcardunetiredbones: nope... they don't teach this anywhere18:59
jelknertiredbones, no it is funded by the cando project18:59
jelknerwe are using it to train future cando developers18:59
jelknerso we really do need to move, or the project will not be able to move18:59
jelknerwe want to do a sprint in the summer19:00
pcardunenow, i made a mistake earlier.  the file should be with an s... not  otherwise the zope testrunner will not work... we will get to that in a second19:00
jelknerso the participants need to be able to write zope3 code by then19:00
flinttiredbones, I have the following line and am now so rattled I cannot even type well...19:00
flint>>> sys.path19:01
flint['', '/usr/local/src/Zope3/src', '/usr/local/lib/', '/usr/local/lib/python2.4', '/usr/local/lib/python2.4/plat-linux2', '/usr/local/lib/python2.4/lib-tk', '/usr/local/lib/python2.4/lib-dynload', '/usr/local/lib/python2.4/site-packages']19:01
jelknerplease pcardune, let's move on...19:01
flintthe path you suggest is not there, likely because i shelled to root to do this.  let me shell out and try again...19:01
flintjelkner, why are you writing code that does not work as root? (if that is the case)19:02
pcarduneok, so once you have changed the name of the file to (with an s) we can try running the test19:02
jelknerwhich test?19:02
pcardunethe one in README.txt19:02
pcarduneall it does is import timeclock.person19:02
jelknerthat had cando in it?19:02
pcarduneyes, right, i forgot to fix that19:03
pcarduneit should read...19:03
pcarduneThe TimeClock Application19:03
pcarduneThis application stores hours that people have worked19:03
pcarduneCreating Person Objects19:03
pcarduneA Person object stores information about a person who works19:03
pcardune  >>> from timeclock.person import Person19:03
tiredbonesflint,I'm soory, but I should not distrupt this forum.19:03
pcarduneso, is everyone on the same page?19:04
jelknerstill says ran 0 tests for me19:04
flinttiredbones, you are the only one helping me.  please continue.  They are all on a box that elkner has set up.  I am on an independent box.  they may have something set I do not.19:05
pcarduneyour file, should look like the one on the wiki19:05
pcardunealso, don't run the test just by running tests.py19:06
pcardunewe want to use the zope test runner to run our tests19:06
pcarduneif you go to your zope instance directory19:07
lhuynhI think the TestsPyV01 site disappeared19:07
pcarduneyou can type "python bin/test -vpu --dir lib/python/timeclock"19:07
tiredbonesflint, try somthing like sys.append(pathename).19:07
pcardunelhuynh: you're right... it did disappear.  jelkner, what happened to it?19:08
jelkneri'm fixing the names19:08
jelknerfirst is wast, then, now it is going back to test.py19:09
jelknergive me a minute19:09
flinttiredbones, the /usr/local/src/Zope3/src does not exist.  I have Python at that level.19:09
flintlet me figure where Zope3/src is kept on this machine and maybe fix this problem.19:10
tiredbonesflint, do a find on Zope3.19:10
lhuynhflint: we're supposed to have a Zope3/src directory?19:10
jelknerpcardune: is this correct now?19:11
flintlhuynh, I have no idea.19:11
pcardunejelkner: yes, that looks correct19:12
jelknerlhuynh: no, linda19:12
flintlhuynh, linda are you having problems as well?19:12
jelknerthe system on which you are working (maddog) has the zope3 source in /usr/local/src/Zope3/src19:12
jelkneryour personal instance is in $HOME/zope319:12
flintjelkner, my machine does not.19:13
jelknerflint: it would be *much* easier for you if you would set things up like in the notes19:13
jelknerotherwise, you will always have problems19:13
flintjelkner, it would be much easier if we were all using the same machine, then these bugs would turn up during implementation! :^)19:14
flintjelkner, this is not in the notes, I am looking at them.19:14
jelknerlook again19:14
jelkneri will quote19:14
jelkner    * A runnable instance of zope3 (see for how to set this up on Ubuntu Breezy or Dapper)19:15
jelknerand: Good morning, everyone, let's start learning to program in Zope3! To begin with, I will assume you each have read and have a running instance of zope3 in your home directory in a subdirectory called zope319:16
flintjelkner, my setup of Zope3 is running in /home/zope19:16
flintjelkner, that is how the ubuntu install set it up.19:16
jelknerflint: please, we only have 45 minutes left19:17
jelkneri'll help you with this later19:17
flintjelkner, did it strike you as odd that everyone has a $HOME instance?19:17
flintjelkner, this is a problem for anyone not running on maddog.19:18
jelknerpcardune: what about README.txt?19:18
pcardunejelkner: could you upload the README.txt file to the wiki19:18
pcarduneit should look like what I wrote above19:18
jelknerwill do19:19
flinttiredbones, the problem is that they each have $HOME/Zope3/src driectories and my does not have this.  thanks.19:20
tiredbonespcardune, jelkner, If I get update with you folks would you mind if I participate?19:20
pcarduneit's fine with me19:21
tiredbonesflint, if you have Zope3 installed point your system at it.19:21
jelknerthat would be great19:21
jelknerhow is this?19:22
pcardunethat looks great19:22
lhuynhI thought pcardune said the entire thing is in docstrings?19:22
tiredbonespcardune, do you have email I could possible ask some question while I'm setting up?19:22
flinttiredbones, I have /home/flint/src/Zope-3.2.0/19:22
pcardunelhuynh: you don't have to write the quotations because the whole document is a docstring19:22
pcardunetiredbones: yeah, paulcarduner@gmail.com19:23
lhuynhpcardune: oh, okay19:23
flintpcardune, I am very frustrated.  you are on maddog too eh?19:23
jelknerflint: *Please* log off and let me help you later19:23
pcarduneflint: no, I am on my own box19:23
jelknerpcardune: what next?19:24
flintpcardune, thanks.  I will continue to troubleshoot.19:24
pcarduneok, now you can try running the test using the zope test runner19:24
pcarduneif you go to your instance home19:24
pcardunepython bin/test -vpu --dir lib/python/timeclock19:25
jelknerpython: can't open file 'bin/test': [Errno 2] No such file or directory19:26
pcarduneare you in your instance home?19:27
lhuynhI got that, also19:27
jelkneryou mean /usr/local/src/Zope3/src or $HOME/zope3 ?19:27
pcardunethere should be a folder called bin in there19:28
flintjelkner, I am not logging off this is too damn much fun to watch :^)19:28
flintpcardune, would it be possible to write a test to validate paths?19:29
tiredbonespcardune, What is the name of the instance that you are useing for this class?19:29
jelkner$ python bin/test -vpu --dir timeclock19:29
jelknerRunning tests at level 119:29
jelknerTest-module import failures:19:29
jelknerModule: timeclock.tests19:29
jelknerNameError: global name 'doctest' is not defined19:29
jelknerTotal: 0 tests, 0 failures, 0 errors19:29
jelknerTest-modules with import problems:19:29
jelkner  timeclock.tests19:29
pcarduneflint: i suppose it would be possible19:29
flintpcardune, you understand why I feel this might be valuable, eh Professore?19:30
pcarduneok, there were actually a few errors in the file19:30
jelknerpcardune: it couldn't find timeclock if i typed lib/python/timeclock19:31
jelknermore path issues19:31
jelknerflint: yes, paul, this is hard.19:31
pcardune now shows it correctly19:32
jelknerit is even harder if you don't prepare ahead of time!19:32
flintjelkner, I did not know this problem existed until I started this meeting.  did you?19:33
flintpcardune, how would we test for proper path?19:33
jelknerwe talked about it last week, paul19:33
jelknerand *then* i tried to write up docs that would help19:33
*** eeblefish has joined #schooltool19:34
jelknerrobbie, welcome19:34
lhuynhhello :)19:34
pcarduneflint: your test would probably end up being to rigid to work on lots of platforms19:34
eeblefishFinally got here!   : )19:34
pcarduneflint: it would be a bit challenging19:34
flintwhat we are testing for this the abililty to get to the Zope3 binaries eh19:35
pcarduneso jelkner, with those changes to, what is your output after running the test?19:36
jelkner$ python bin/test -vpu --dir timeclock19:36
jelknerRunning tests at level 119:36
jelknerTest-module import failures:19:36
jelknerModule: timeclock.tests19:36
jelknerNameError: global name 'doctest' is not defined19:36
jelknerTotal: 0 tests, 0 failures, 0 errors19:36
jelknerTest-modules with import problems:19:37
jelkner  timeclock.tests19:37
lhuynhI got something similiar:19:37
pcarduneplease look at again19:37
pcardunei made changes to it to fix your problem19:37
pcardunethe problem was that we were using explicit python imports, but making implicit function calls19:41
pcarduneas in, if you import zope.testing.doctest, you cant say just doctest.DocFileSuite(....) but have to write zope.testing.doctest.DocFileSuite(.....)19:42
jelkner$ python bin/test -vpu --dir timeclock19:43
jelknerRunning tests at level 119:43
jelknerRunning unit tests:19:43
jelkner  Running:19:43
jelkner    1/1 (100.0%) /home/jelkner/zope3/lib/python/timeclock/README.txt19:43
jelknerError in test /home/jelkner/zope3/lib/python/timeclock/README.txt19:43
jelknerTraceback (most recent call last):19:43
jelkner  File "/usr/lib/python2.4/", line 251, in run19:43
jelkner    self.setUp()19:43
jelkner  File "/usr/local/src/Zope3/src/zope/testing/", line 2179, in setUp19:43
jelkner    self._dt_setUp(test)19:43
jelkner  File "/home/jelkner/zope3/lib/python/timeclock/", line 7, in setUp19:43
jelkner    setup.placefulSetUp()19:43
jelknerNameError: global name 'setup' is not defined19:43
jelkner  Ran 1 tests with 0 failures and 1 errors in 0.052 seconds.19:43
pcarduneyes, you have to fix all of them.  which means instead of just setup.placefulSetUp, write
pcarduneand the same for the teardown function... it should be
pcarduneand your test_suite function should look like this:19:44
pcardunedef test_suite():19:44
pcardune    return unittest.TestSuite((19:44
pcardune        zope.testing.doctest.DocFileSuite(README.txt,19:44
pcardune            setUp = setUp,19:44
pcardune            tearDown = tearDown,19:45
pcardune            globs = {'pprint': zope.testing.doctestunit.pprint},19:45
pcardune            optionflags = zope.testing.doctest.NORMALIZE_WHITESPACE |19:45
pcardune                          zope.testing.doctest.ELLIPSIS),19:45
pcardune        ))19:45
jelkner$ python bin/test -vpu --dir timeclock19:45
jelknerRunning tests at level 119:45
jelknerRunning unit tests:19:45
jelkner  Running:19:45
jelkner    1/1 (100.0%) /home/jelkner/zope3/lib/python/timeclock/README.txt19:45
jelknerFailure in test /home/jelkner/zope3/lib/python/timeclock/README.txt19:45
jelknerFailed doctest test for README.txt19:45
jelkner  File "/home/jelkner/zope3/lib/python/timeclock/README.txt", line 019:46
jelknerFile "/home/jelkner/zope3/lib/python/timeclock/README.txt", line 7, in README.txt19:46
jelknerFailed example:19:46
jelkner    from timeclock.person import Person19:46
jelknerException raised:19:46
jelkner    Traceback (most recent call last):19:46
jelkner      File "/usr/local/src/Zope3/src/zope/testing/", line 1256, in __run19:46
jelkner        compileflags, 1) in test.globs19:46
jelkner      File "<doctest README.txt[0]>", line 1, in ?19:46
jelkner        from timeclock.person import Person19:46
jelkner    ImportError: No module named person19:46
jelkner  Ran 1 tests with 1 failures and 0 errors in 0.116 seconds.19:46
jelkneryeah, a failing test!19:46
pcarduneExellent! your test is working perfectly!19:46
jelknerpcardune: i have a question about running this19:46
pcardunejelkner: please ask19:46
jelkneri want to work in $HOME/zope3/lib/python/timeclock19:47
jelknerbut i need to run the test from $HOME/zope319:47
jelknermoving back and forth is a pain19:47
jelknercan we fix this?19:47
jelknerso that tests can be run from our development directory?19:47
pcardunethey actually can be run from the development directory19:48
pcarduneif you are in the timeclock folder, just type19:48
pcardune../../../bin/test -vpu --dir timeclock19:48
flintpcardune, I think I finally understand what is wrong.  and the docs are the problem.19:49
flintjelkner, the only thing worse than no docs is wrong docs... :^)19:50
jelknerpython $HOME/zope3/bin/test -vpu --dir timeclock works too19:50
jelknerfrom anywhere19:51
flintjelkner, on your system.19:51
flintjelkner, anywhere does not include my system so you are wrong.19:51
jelknerflint: on any system setup with our instructions19:51
jelknerthat was the *assumption* in the docs19:52
jelknerif you depart from those instructions, you need to19:52
flintjelkner, the instructions are wrong.19:52
jelknerA). know enough to make adjustments19:52
jelknerB). suffer and complain19:52
jelkneryou choose B19:53
flintjelkner, you should set up timeclock in the user's directory, not the whole zope3 tree.19:53
pcardunewell, i think the class is pretty much over for today... I will send out a tar file to all of you with the timeclock package and everything you should have in it19:53
*** ignas has joined #schooltool19:53
jelknerpcardune: thanks again19:53
flintpcardune, thanks for the help.19:53
*** Yuy has joined #schooltool19:54
Yuyam I back on?19:54
jelkneryuy: yes linda19:54
flintpcardune, why did we set up and individual instance of zope3 in each user space?19:54
jelknerjust in time to get our homework assignment19:54
tiredbonespcardune, I'm reading the logs for this irc noe will be in contact.19:54
jelknertiredbones: i'm going to turn this into a lesson and put it on the wiki19:54
flintthe way that zope3 setup on my machine was in /home/zope19:55
pcarduneflint: so that they each have their own instance to run... its kind of like each person having their own notebook in a math class19:55
jelknerpcardune: homework?19:55
flintpcardune, the issue is that my copy of zope did not set that way.  and this is the root of the problem.19:55
tiredbonesjelkner, wiki address?19:55
flintpcardune, I recommend that we get this licked as homework.19:55
pcardunei'll send out the homework assignment with the tar.gz file of the timeclock app as it should be now19:56
pcardunein the next 20 minutes or so19:56
flintpcardune, I so much wanted to ask questions about chapter 13, and I instead got blindsided by this installation issue19:56
jelknerpcardune: what does your schedule look like for tomorrow?19:56
pcardunemy calendar says presidents day19:56
jelkneri'll give you a call so we can go over this19:56
jelknerwill you be available any time?19:57
jelkneri have off19:57
jelknerso my schedule is flexible19:57
pcardunein the morning i suppose, around this time19:57
jelknerok, 11 am my time?19:57
pcarduneflint: you can ask me all the questions you want as soon as this class is over, i'll stick around19:57
flintam I wrong in saynig that a default installation of zope3 would set up in /home/zope?19:57
pcardunejelkner: 1pm your time19:58
Yuyso what's the homework?19:58
pcarduneYuy: i'll send it out by email19:58
pcardunejelkner: could you give me the emails of everyone who is in the class?19:58
flintpcardune, we can fix this to work generally...19:58
flintpcardune, flint@flint.com19:58
jelkneri'm in a hotel room now and i need to leave19:58
jelkneri'll get back to you tomorrow19:59
jelknerbye everyone!19:59
flintjelkner, what hotel room are you in?19:59
pcarduneok, well, before everyone leaves, could they give me their email addresses?19:59
pcardunebye jelkner19:59
*** jelkner has quit IRC19:59
tiredbonespcardune, can I send you my email address?19:59
pcardunetiredbones: absolutely19:59, or I don't check that often though, should I?20:00
flintpcardune, the idea of each of us having a "math book" is ok but would not a link from a common "math book" work better?20:00
pcarduneeeblefish: which one do you check more often?  i'll send it there.20:00
eeblefishThe latter one, I guess, Thanks : )20:01
pcarduneflint: why would it work better?20:01
Yuyare you going to send it within the next half hour? or can I check my mail tomorrow or something?20:01
flintpcardune, this is like the default password thing in ubuntu install.20:01
pcarduneYuy: i will send it in the next half hour, but you are free to check your mail tommorow20:01
flintbecause it is then a comon link that all share.20:01
pcarduneflint: but then there won't be active learning... again with the metaphor... the teacher writes everything on the chalkboard, and everyone gets to see it... but if they want to learn anything and remember anything, it is probably a good idea for them to write down whats on the chalk board20:02
flintpcardune, you would have timeclock in your local directory or your ~/src/timeclock and work on it from there.20:03
flintpcardune, are all the copies of timeclock linked?  mine is not.20:03
pcarduneultimately the best thing would be for everyone to have their own copy of everything, on their own computer, and we work with gobby20:03
Yuywhere are we supposed to have this src/ folder?20:04
pcardunethe copies of timeclock are not linked20:04
pcarduneYuy: don't worry about that, it's already set up for you20:04
flintYuy, you see on maddog you do, on my own system I do not.20:05
pcarduneflint: zope works in two ways, as a python package and as an actual server20:05
Yuywell, that folder's not in my zope3/ folder20:05
flintpcardune, the default path for the server is /home/zope20:05
flintand the path works from there fine.20:05
pcarduneyou might want to run 5 zope servers on your computer... but they should all be using the same python packages to run20:05
pcarduneYuy: the src folder is located where zope is installed.  your zope3 folder is just an instance of zope20:06
flintubuntu installed those common packages in /home/zope20:06
flintpcardune, believe me I would not have put them there...20:07
pcarduneflint: yeah... neither would I... that is kind of strange20:07
pcarduneflint: anyways, as long as the python path points to that directory, then the zope python package is installed20:07
tiredbonesflint, you could delete it all and go to the Zope site to dowload is where you want.20:08
pcarduneso, back to running 5 servers on the same machine... they are different servers, with different databases, but they all run with the same python package...20:08
Yuypcardune, flint: anything else I need to stay around for?20:08
YuyI can get the IRC log later20:08
pcarduneYuy: nope, you are free to go20:08
pcarduneclass dismissed20:08
*** Yuy has quit IRC20:09
*** eeblefish has quit IRC20:10
pcarduneso, on maddog, that is how it's been set up.  each user has their own zope server to mess around with20:10
pcardunebut they all use the same python package20:10
pcarduneflint: does that make sense?20:10
tiredbonespcardune, I sent you my email address.20:11
*** lhuynh has quit IRC20:12
pcardunetiredbones: ok great20:13
flintpcardune, jeff just called and yelled at me for 5 minutes.  you got a phone number?20:13
tiredbonespcardune, I'll run my own copy of Zope so that you folks don't have to bother with setting up things on your server.20:14
flintthe python package is not the problem.  python is loading and running just fine20:14
pcardunetiredbones: good20:14
flinttiredbones, that is what got me in dutch with the group.20:14
pcarduneflint: yeah i do20:14
pcardunei'll email it to you20:14
flintpcardune, but I am proud of this.  I suspect that there is a problem with the setup.  thanks for the number.  Glad that I can still get elkner worked up.20:15
pcardunedid you ever doubt that you couldn't?20:16
flintpcardune, elkners instructions begin with "# cd $HOME/zope3/lib/python20:16
flintpcardune, and I am truly sorry I pissed you off.20:16
flintso each person has a lib python?20:16
pcarduneflint: oh no, you didn't make me angry or anything.  there is a problem, its just something that should be handled in a query ;)20:17
pcarduneflint: yes, each person has a lib/python20:17
pcarduneso, when you create a zope instance you can add whatever python packages to your zope instance... they live in $ZOPE_INSTANCE_HOME/lib/python20:18
pcardunewhere ever your zope instance home happens to be20:18
flintok let me move my stuff from /home/zope/lib/python/timeclock to this place20:19
tiredbonespcardune, Was Feb. 12 the first class you had?20:19
pcardunetiredbones: yes20:19
flinttiredbones, well not exactly but lets say so.20:19
pcarduneflint: what you should do is a make a zope instance for yourself in your home directory20:20
pcardunei bet the mkzopeinstance executable is even in your path already20:20
tiredbonespcardune, So if I read everything and do all the assignments I should be ok?20:21
pcardunetiredbones: yeah20:21
flintnow I have in my home directory "/home/flint/lib/python/timeclock20:21
flinthere is the problem:20:22
flint|flint@docbox:~/lib/python/timeclock $ cd /usr/local/src/Zope3/src20:22
flintbash: cd: /usr/local/src/Zope3/src: No such file or directory20:22
flintpcardune, is this a problem?20:23
pcardunenot necessarily20:23
pcardunecould you give me a login to your box?20:23
flintyou have ssh usual password, please change.20:25
tiredbonesflint, Have looked at ""(?) or benji tutorial?20:25
flinttiredbones, I think we are getting to the nub of the problem,  sometimes it is like roto-rootering.20:26
flinttiredbones, you just have to keep grinding until the plug comes out!20:27
tiredbonesflint, that should be com instead of org.20:27
pcarduneok, flint, your zope application is in /usr/local/Zope-3.2.0/20:29
*** tiredbones has left #schooltool20:36
*** tiredbones has joined #schooltool20:37
tiredbonespcardune, ayt -   In going thru the logs you ask they read the chapters in the zope book, could you tell me what chaters you wanted them to read/22:13
tiredbonespcardune, that's the log for the 12th of Feb.22:14
*** wrobel has quit IRC23:48

Generated by 2.15.1 by Marius Gedminas - find it at!