Extending Harvest

Daniel Holbach daniel.holbach at ubuntu.com
Mon Dec 13 14:42:27 GMT 2010


Hello everybody,

I wrote about the new Harvest [1] a couple of times already. Some days
ago we released 0.2.4 which fixed a bug which was filed more than a
cycle ago… it merely said: "import json".

The way Harvest works is that it reads a list of URLs that list
opportunities, so Harvest is very easily extensible. It doesn’t need to
know about bug reports, merge requests, upstreams, downstreams and the
like: it just knows about packages and opportunities.

The old format for opportunities was:

  <sourcepackage>,<url>,<description>


It was only a matter of time that this wasn't enough any more. Some
people suggested to add something like "long description" or "severity"
to opportunities to make it clearer what they are about or to make an
informed decision. So we moved to JSON where it’s very easy to add
optional arguments and you don’t have to guess arguments based on their
position.

If you wrote a script that spits out .csv files, that's fine – it's
still supported. In the new world you’d do it like this:

[{"source_package": "xine-lib", "short_description": 123456, "link":
"https://launchpad.net/bugs/123456"},
{"source_package": "zope-archetypes", "short_description": 54321,
"link": "https://launchpad.net/bugs/54321", "description": "Please sync
zope-archetypes 1.3.9-2 from Debian unstable", "severity": "undecided"}]

Only "source_package", "short_description" and "link" are required.
Everything else is optional.

I'd LOVE to see more opportunities for Harvest coming up [3]. Once you
got your script set up, just bzr branch lp:harvest-data add the URL to
the JSON output, and propose a merge [2].

[1] http://harvest.ubuntu.com/
[2] https://code.launchpad.net/~harvest-dev/harvest-data/trunk
[3] https://bugs.launchpad.net/merge-o-matic/+bug/674518 for example :-)

Have a great day,
 Daniel



More information about the ubuntu-devel mailing list