*** tvon has joined #schooltool | 01:41 | |
*** FarcePest has quit IRC | 04:37 | |
*** lunarosity has quit IRC | 07:16 | |
*** alga has joined #SchoolTool | 12:42 | |
*** mgedmin has joined #schooltool | 13:15 | |
*** ignas has joined #schooltool | 14:12 | |
*** th1a has joined #schooltool | 14: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 #schooltool | 15:01 | |
*** tvon has left #schooltool | 15:05 | |
* mgedmin is hungry, but cannot decide where to go for lunch :-/ | 15:54 | |
srichter | mgedmin: 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 |
th1a | srichter: I made some testbrowser tests for my game last night. Worked like a charm. | 15:56 |
srichter | cool! | 15:56 |
srichter | th1a: I just updated the branch to the latest version, which has a a bit different API, but it is cleaner | 15:57 |
th1a | I'll check it out. | 15:57 |
srichter | th1a: I think I am going to convert all functional browser tests in the branch to testbrowser | 15:57 |
th1a | I'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 |
srichter | I am also thinking about a REST version | 15:58 |
th1a | That's a good point. | 15:58 |
srichter | a lot of the REST ftests are very brittle and we could benefit from a high-level API | 15:58 |
th1a | It would also probably be the most usable kind of documentation for outside (and non-Python) developers. | 16:00 |
srichter | you mean REST? | 16:00 |
srichter | yes, I agree | 16:00 |
th1a | Yes functional doctests for REST. | 16:01 |
srichter | you wanna brainstorm the idea? | 16:01 |
srichter | how 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 |
srichter | client = RESTClient() | 16:05 |
srichter | client.newRequest('GET /persons/stephan') | 16:05 |
srichter | client.data = 'XML data here' | 16:05 |
srichter | client.send() | 16:06 |
srichter | 16:06 | |
srichter | or | 16:06 |
srichter | 16:06 | |
srichter | client.GET('/persons/stephan') | 16:06 |
srichter | client.newRequest('GET /persons/stephan') | 16:06 |
srichter | <line above wrong> | 16:06 |
srichter | client.data = 'XML data here' | 16:06 |
srichter | client.send() | 16:06 |
srichter | 16:06 | |
srichter | or | 16:06 |
srichter | 16:06 | |
*** tvon has joined #schooltool | 16:07 | |
srichter | client.data = 'XML data here' | 16:07 |
srichter | click.send('GET /person/stephan') | 16:07 |
srichter | 16:07 | |
srichter | or | 16:07 |
srichter | 16:08 | |
srichter | client.data = 'XML data here' | 16:08 |
th1a | Doesn't seem like "click" is the right idea. | 16:08 |
srichter | client.GET('/person/stephan') | 16:08 |
srichter | th1a: that's a typo I did not notice; I meant client | 16:08 |
th1a | See, I'm paying attention. | 16:09 |
srichter | :-) | 16:09 |
srichter | of course, we will support other client attributes, like http version | 16:09 |
srichter | client.httpVersion = 'HTTP/1.1' | 16:09 |
srichter | client.contents | 16:10 |
srichter | gives you the data | 16:10 |
srichter | but I think we could support high-level XML APIs as well | 16:10 |
srichter | like parsing output with X-Path expressions | 16:10 |
srichter | or selecting XML snippets with X-Path | 16:10 |
srichter | client.select(xpath='...') | 16:11 |
srichter | <subelement>... | 16:11 |
srichter | mgedmin: are you following this too? | 16:11 |
srichter | th1a: what would be your preferred method? | 16:12 |
srichter | what do you think its best for the user? | 16:12 |
*** bskahan has quit IRC | 16:13 | |
th1a | mgedmin et al are intently talking about something else in Lithuanian. | 16:14 |
srichter | ok | 16:14 |
srichter | th1a: so what ya think? | 16:14 |
ignas | sorry, other project ... | 16:14 |
th1a | Well, they all seem pretty similar to me. | 16:15 |
th1a | But in general the right track. | 16:15 |
srichter | yeah, but would be most intuitive? | 16:15 |
srichter | a bit of a different approach would be: | 16:16 |
srichter | req = client.newRequest(...) | 16:16 |
srichter | req.data = '...' | 16:16 |
srichter | req.send() | 16:16 |
srichter | though I think this might be more overhead than needed and looks too programming like | 16:16 |
th1a | It takes a while to get a feel for thinking about how do design syntax for things like this. | 16:17 |
th1a | I can't really think beyond being a user. | 16:17 |
mgedmin | srichter, we had a high-level client API for the RESTive API already; find guiclient.py in subversion graveyard | 16:17 |
mgedmin | it was slightly misnamed | 16:17 |
th1a | mgedmin: That's true. | 16:18 |
th1a | Do we use that for testing? | 16:18 |
mgedmin | no | 16:18 |
srichter | mgedmin: ok, I'll look at it | 16:19 |
srichter | mgedmin: what toolkit did it use? | 16:19 |
mgedmin | http://source.schooltool.org/viewcvs/branches/schooltool-twisted-based/src/schooltool/clients/guiclient.py?rev=3466&view=auto | 16:19 |
mgedmin | urllib + libxml2 | 16:19 |
mgedmin | err, httplib actually | 16:20 |
th1a | It is a part of SchoolTool which could use some love. | 16:24 |
srichter | he he | 16:26 |
srichter | mgedmin: so you decided to have a method for each verb; I think this is a good idea | 16:33 |
srichter | th1a: btw, how is your game coming along? | 16:50 |
th1a | Well, I got to the point where I needed players. | 16:54 |
th1a | Can't do turns without players. | 16:54 |
th1a | So I'm in the process of typing some of the code from Phillip's book to let people create accounts. | 16:54 |
srichter | well, you can stub it | 16:55 |
th1a | I figured I might as well do it. | 16:55 |
th1a | So I needed to create a "parlour" object where people log in and start games. | 16:55 |
th1a | And it seemed that I needed to make that a Site. | 16:56 |
th1a | So I had to figure that stuff out. | 16:56 |
srichter | well, that stuff it good to know | 16:58 |
th1a | Right. More of the SchoolTool code makes sense to me now ;-) | 17:15 |
*** bskahan has joined #schooltool | 18: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 #schooltool | 18:29 | |
*** alga has quit IRC | 18:40 | |
povbot | /svn/commits: * srichter committed revision 4850: | 18:49 |
povbot | /svn/commits: Converted to testbrowser tests. | 18:49 |
*** alga has joined #SchoolTool | 19:03 | |
mgedmin | th1a, my vim configuration is http://mg.pov.lt/mg-vimrc.tar.gz | 19:33 |
mgedmin | interesting bits: first page of vimrc that sets various options | 19:33 |
mgedmin | (vim's defaults are backwards compatible with vi from stone ages, and therefore not very convenient) | 19:33 |
ignas | vim's defaults are backwards, and therefore not very convenient | 19:34 |
mgedmin | most of my config is junk that you should just ignore (so as to not become scared of vim's config files) | 19:34 |
mgedmin | useful 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 |
mgedmin | more useful stuff: SwitchCodeAndTest toggles between a Python module and its test module, if you follow the conventions we use in ST | 19:36 |
mgedmin | (i.e. /path/to/foo.py <-> /path/to/tests/test_foo.py) | 19:37 |
srichter | mmh, some of the ftests are not well developed | 19:37 |
mgedmin | (also /path/to/pkg/__init__.py <-> /path/to/tests/test_pkg.py) | 19:37 |
ignas | srichter, was that a politically correct way of saying retarded ? | 19:37 |
srichter | for example, app-security assigns st.create to a user who then tries to add a group | 19:37 |
srichter | oh well, never mind I think | 19:38 |
srichter | no, it was meant as I wrote it | 19:39 |
* mgedmin should blog about his vi config | 19:39 | |
srichter | mmh, I have no clue how adding a group with st.create permissions worked before in the ftests | 19:41 |
srichter | ohh, because it does not send the description of the group | 19:41 |
srichter | while the browser sends even an emoty description | 19:42 |
alga | mgedmin: vim crashed on me today | 19:43 |
*** th1a has quit IRC | 20: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 IRC | 20:56 | |
*** ignas has quit IRC | 20:58 | |
*** bskahan has quit IRC | 23:03 | |
srichter | cal-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!