Tiny little BugSquad tool: AdoptionStats

In order to make fetching a the number of bugs in each status against a certain package easy I’ve written a small script called AdoptionStats. We’re currently working on the Adopt-a-Package project for the Ubuntu Bug Squad and if you want to be able to keep track of how a package is doing you need data: information about the current status and information about past statuses for comparison.

AdoptionStats generates a data list and constantly returns it in the same format and therefore the results can easily be manipulated by other scripts, e.g. for generating graphs.


I’ve pushed to script to a Bazaar branch on Launchpad: lp:~qense/+junk/adoptionstats. If you haven’t done it yet, install Bazaar and download the code with the command “bzr branch lp:~qense/+junk/adoptionstats” .

The script depends on the package ‘python-launchpad-bugs’, execute the command “sudo apt-get install python-launchpadlib” python-launchpad-bugs or click here click here to install it if you haven’t installed it yet.
(now using python-launchpadlib, thanks to thekorn)

The usage is very simple, but make sure you’ve made the script executable — right-click->Properties->Permissions->check ‘Allow execution of this file’, or just “chmod +x ./adoptionstats” . For getting a report on the current status of the ‘nautilus’ source package you enter the command “./adoptionstats -p nautilus” in the directory you save the file. The result is like this:

2010-01-21 16:15 {'need_forwarding': 5, 'per_status': {'In Progress': 3, 'Confirmed': 0, 'Invalid': 2279, 'New': 34, 'Fix Committed': 1, 'Triaged': 583, 'Fix Released': 754, 'Incomplete': 158, "Won't Fix": 16}}

Since the application uses optparse you can get the help text with “./adoptionstats -h”, but the only other option next to ‘-p’ and ‘-h’ is ‘-v’, which enables the printing of debug-level messages to your commandline.

Leave a comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.