Artikel getaggt mit jockey

New Jockey 0.5 Beta 1 release

I just released the first beta release of Jockey 0.5, which fixes a ton of bugs compared to the first Alpha from two weeks ago. Compared to 0.4, it grew quite a lot of new features:

  • Split program into a privileged system D-BUS backend (access controlled by PolicyKit), and unprivileged frontend. This provides a cleaner design, gets rid of ugly distribution specific hacks and makes the program more portable.
  • Add support for detecting printers. Add Driver DB implementation for openprinting.org database lookup. Supports package systems “apt”, “urpmi”, and “yum” right now.
  • New Driver DBs can now added dynamically at run time through a D-BUS call (such as adding an XMLRPC compatible DB on a new server).
  • Upstream OSLib now uses PackageKit’s “pkcon” for query operations, so that distributions which support packagekit do not need to implement their custom functions for it. (Package installation/removal does not use packagekit yet, due to a bug in dbus-glib, but it is planned).
  • Provide a session D-BUS interface so that applications like system-config-printer can call Jockey through an abstract interface for looking for a driver for a particular device. This will search for a driver in all databases, ask the user for confirmation, and install it.
  • Add support for “recommended” driver versions, in case several different versions of a driver are available (which is e. g. the case with the proprietary NVidia driver, or lots of drivers from openprinting.org).
  • GTK and KDE user interface got some usability and workflow improvements. They also show the license and support status now:

  • KDE user interface got ported to PyKDE 4:

    • As of today, 0.5 beta 1 was uploaded to Ubuntu Intrepid, too.

      Tags: ,

Python code coverage

Today I was playing with python-coverage, which seems to be the tool of choice for code coverage measurement in Python. Since I am constantly hacking on Jockey’s test suite, I want to strive for perfection and cover everything, so it does sound like something worthwhile.

First I tried to use it like documented:

python /usr/share/python-support/python-coverage/coverage.py -x tests/run

which just caused the tests not to run at all, for no immediately obvious reason (it worked fine with real Python modules in apport). However, it gets much nicer once you stop trying to wrap it around the command line call and start to integrate it into the test suite code itself:

import coverage
coverage.erase()
coverage.exclude('raise NotImplementedError')
coverage.start()

[... run all the tests ... ]

coverage.stop()
coverage.report(glob(‘jockey/*.py’))
coverage.report(glob(‘examples/handlers/*.py’))
coverage.erase()

(which is more or less what I committed).

This will run all the tests, and give me a report about how much code they covered, plus a list of code lines which weren’t touched. For example:

Name                 Stmts   Exec  Cover   Missing
jockey/handlers        248    242    97%   402-405, 420-421, 514

Also, the exclude() interface is much more flexible than putting #pragmas all over the place (which do not seem to really work anyway unfortunately).

Now, off to fixing everything to get 100%. I was surprised how many little bugs I found and fixed while completing the tests. Test suites FTW!!

Tags: , ,

Getting ready for Austin

I’m really looking forward to go to Austin next Saturday, for my first LinuxFoundation collaboration summit. I’m particularly interested in bringing forward the work of the Driver Backport workgroup, where my focus is on delivering drivers to the user.

Tags: ,