Home Home > 2011 > 06 > 03 > [gsoc] summary of week 2
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

[gsoc] summary of week 2

June 3rd, 2011 by

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)

Currently I’m still working on the “remote models”:

  • decided to use lxml.objectify:
  • – 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()

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)

Both comments and pings are currently closed.

Comments are closed.