IRC log of #schooltool for Tuesday, 2005-08-23

*** tvon has joined #schooltool01:41
*** FarcePest has quit IRC04:37
*** lunarosity has quit IRC07:16
*** alga has joined #SchoolTool12:42
*** mgedmin has joined #schooltool13:15
*** ignas has joined #schooltool14:12
*** th1a has joined #schooltool14:44
povbot/svn/commits: * srichter committed revision 4845:14:51
povbot/svn/commits: Rearranged timetable code a bit. The files in this package were just too long.14:51
povbot/svn/commits: * srichter committed revision 4846:14:54
povbot/svn/commits: Remove testbrowser. This will temporarly break ftests on the branch. I will add a new testbrowser update in a moment.14:54
*** bskahan has joined #schooltool15:01
*** tvon has left #schooltool15:05
* mgedmin is hungry, but cannot decide where to go for lunch :-/15:54
srichtermgedmin: go! :-)15:55
povbot/svn/commits: * srichter committed revision 4847:15:55
povbot/svn/commits: Here is the latest version of the testbrowser and the fixes to the level functional tests.15:55
th1asrichter:  I made some testbrowser tests for my game last night.  Worked like a charm.15:56
srichtercool!15:56
srichterth1a: I just updated the branch to the latest version, which has a a bit different API, but it is cleaner15:57
th1aI'll check it out.15:57
srichterth1a: I think I am going to convert all functional browser tests in the branch to testbrowser15:57
th1aI'm impressed that you've got all the tests passing already after such a big rearrangement of the code.  I gave it a spin last night.15:57
srichterI am also thinking about a REST version15:58
th1aThat's a good point.15:58
srichtera lot of the REST ftests are very brittle and we could benefit from a high-level API15:58
th1aIt would also probably be the most usable kind of documentation for outside (and non-Python) developers.16:00
srichteryou mean REST?16:00
srichteryes, I agree16:00
th1aYes functional doctests for REST.16:01
srichteryou wanna brainstorm the idea?16:01
srichterhow would such a REST browser ideally look like?16:04
povbot/svn/commits: * srichter committed revision 4848:16:04
povbot/svn/commits: Converted SchoolTool setup part of the tests to testbrowser metapher as well.16:04
srichterclient = RESTClient()16:05
srichterclient.newRequest('GET /persons/stephan')16:05
srichterclient.data = 'XML data here'16:05
srichterclient.send()16:06
srichter16:06
srichteror16:06
srichter16:06
srichterclient.GET('/persons/stephan')16:06
srichterclient.newRequest('GET /persons/stephan')16:06
srichter<line above wrong>16:06
srichterclient.data = 'XML data here'16:06
srichterclient.send()16:06
srichter16:06
srichteror16:06
srichter16:06
*** tvon has joined #schooltool16:07
srichterclient.data = 'XML data here'16:07
srichterclick.send('GET /person/stephan')16:07
srichter16:07
srichteror16:07
srichter16:08
srichterclient.data = 'XML data here'16:08
th1aDoesn't seem like "click" is the right idea.16:08
srichterclient.GET('/person/stephan')16:08
srichterth1a: that's a typo I did not notice; I meant client16:08
th1aSee, I'm paying attention.16:09
srichter:-)16:09
srichterof course, we will support other client attributes, like http version16:09
srichterclient.httpVersion = 'HTTP/1.1'16:09
srichterclient.contents16:10
srichtergives you the data16:10
srichterbut I think we could support high-level XML APIs as well16:10
srichterlike parsing output with X-Path expressions16:10
srichteror selecting XML snippets with X-Path16:10
srichterclient.select(xpath='...')16:11
srichter<subelement>...16:11
srichtermgedmin: are you following this too?16:11
srichterth1a: what would be your preferred method?16:12
srichterwhat do you think its best for the user?16:12
*** bskahan has quit IRC16:13
th1amgedmin et al are intently talking about something else in Lithuanian.16:14
srichterok16:14
srichterth1a: so what ya think?16:14
ignassorry, other project ...16:14
th1aWell, they all seem pretty similar to me.16:15
th1aBut in general the right track.16:15
srichteryeah, but would be most intuitive?16:15
srichtera bit of a different approach would be:16:16
srichterreq = client.newRequest(...)16:16
srichterreq.data = '...'16:16
srichterreq.send()16:16
srichterthough I think this might be more overhead than needed and looks too programming like16:16
th1aIt takes a while to get a feel for thinking about how do design syntax for things like this.16:17
th1aI can't really think beyond being a user.16:17
mgedminsrichter, we had a high-level client API for the RESTive API already; find guiclient.py in subversion graveyard16:17
mgedminit was slightly misnamed16:17
th1amgedmin:  That's true.16:18
th1aDo we use that for testing?16:18
mgedminno16:18
srichtermgedmin: ok, I'll look at it16:19
srichtermgedmin: what toolkit did it use?16:19
mgedminhttp://source.schooltool.org/viewcvs/branches/schooltool-twisted-based/src/schooltool/clients/guiclient.py?rev=3466&view=auto16:19
mgedminurllib + libxml216:19
mgedminerr, httplib actually16:20
th1aIt is a part of SchoolTool which could use some love.16:24
srichterhe he16:26
srichtermgedmin: so you decided to have a method for each verb; I think this is a good idea16:33
srichterth1a: btw, how is your game coming along?16:50
th1aWell, I got to the point where I needed players.16:54
th1aCan't do turns without players.16:54
th1aSo I'm in the process of typing some of the code from Phillip's book to let people create accounts.16:54
srichterwell, you can stub it16:55
th1aI figured I might as well do it.16:55
th1aSo I needed to create a "parlour" object where people log in and start games.16:55
th1aAnd it seemed that I needed to make that a Site.16:56
th1aSo I had to figure that stuff out.16:56
srichterwell, that stuff it good to know16:58
th1aRight.  More of the SchoolTool code makes sense to me now ;-)17:15
*** bskahan has joined #schooltool18:05
povbot/svn/commits: * srichter committed revision 4849:18:23
povbot/svn/commits: Converted tests to the testbrowser. Result:18:23
povbot/svn/commits: - 100 lines less code - More things are tested - One hidden failure corrected ;-)18:23
*** FarcePest has joined #schooltool18:29
*** alga has quit IRC18:40
povbot/svn/commits: * srichter committed revision 4850:18:49
povbot/svn/commits: Converted to testbrowser tests.18:49
*** alga has joined #SchoolTool19:03
mgedminth1a, my vim configuration is http://mg.pov.lt/mg-vimrc.tar.gz19:33
mgedmininteresting bits: first page of vimrc that sets various options19:33
mgedmin(vim's defaults are backwards compatible with vi from stone ages, and therefore not very convenient)19:33
ignasvim's defaults are backwards, and therefore not very convenient19:34
mgedminmost of my config is junk that you should just ignore (so as to not become scared of vim's config files)19:34
mgedminuseful stuff: commands :Grepall (recursive grep), :Gid (if you use GNU id-utils; it's like mini-google or grep on steroids), :Grep (ordinary grep)19:36
mgedminmore useful stuff: SwitchCodeAndTest toggles between a Python module and its test module, if you follow the conventions we use in ST19:36
mgedmin(i.e. /path/to/foo.py <-> /path/to/tests/test_foo.py)19:37
srichtermmh, some of the ftests are not well developed19:37
mgedmin(also /path/to/pkg/__init__.py <-> /path/to/tests/test_pkg.py)19:37
ignassrichter, was that a politically correct way of saying retarded ?19:37
srichterfor example, app-security assigns st.create to a user who then tries to add a group19:37
srichteroh well, never mind I think19:38
srichterno, it was meant as I wrote it19:39
* mgedmin should blog about his vi config19:39
srichtermmh, I have no clue how adding a group with st.create permissions worked before in the ftests19:41
srichterohh, because it does not send the description of the group19:41
srichterwhile the browser sends even an emoty description19:42
algamgedmin: vim crashed on me today19:43
*** th1a has quit IRC20:40
povbot/svn/commits: * srichter committed revision 4851:20:49
povbot/svn/commits: Fix add view. It also required the schooltool.edit permission, since several attributes were added after it was added to the folder and thus security proxied.20:49
povbot/svn/commits: * srichter committed revision 4852:20:51
povbot/svn/commits: Coverted tests to use test browser. Some tests failed to test what they were supposed to test and some were also outdated. I added several more checks and still was able to make the file about 30% shorter.20:51
*** mgedmin has quit IRC20:56
*** ignas has quit IRC20:58
*** bskahan has quit IRC23:03
srichtercal-booking.txt tests a URL that is not even exposed :-\23:10

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!