6 Jun
2011
6 Jun
'11
08:31
On Saturday 04 June 2011 00:56:24 Marcus Hüwe wrote: > Hi, > > here's a small summary of the 2nd (coding) week. This > week I spent most of my time with working on an OO-style class > for doing http requests: > * it's possible to switch the http(s) implementation without touching any > library code > * supports response validation (if a schema was specified for the request) I've looked at the code and tests and like it. As far as I have seen, you included a 'directory' schema from the OBS. At some point in time we may either want to move schemas into a shared module or move osc2 back into the OBS repo. > Currently I'm still working on the "remote models": > * decided to use lxml.objectify [1]: > - goal is to encapsulate the xml logic solely into the object itself > - example workflow: > prj = RemoteProject('some_name') > prj.title = 'dummy' > prj.description = 'foo bar' > repo = prj.add_repository(name='openSUSE_Factory') > repo.add_path(project='openSUSE:Factory', repository='standard') > repo.add_arch('i586') > # change arch to x86_64 > repo.arch[0] = 'x86_64' > repo.save() Good choice, this will greatly reduce the need for XML parsing, does lxml.objectify allow validation when you create an object from a XML string? > > Minor stuff: > * decided to use the "logging" module: > this way we can easily add "debug" and "info" etc. messages and it's up > to the "client" which messages it wants to display (I'm not talking about > the messages which are displayed when "osc up" is called or something like > that) Natural choice, I've seen you used it already in the httprequest module. -- Mit freundlichen Grüßen, Sascha Peilicke http://saschpe.wordpress.com