Archive for the ‘General’ Category

This week in Launchpad’s web API

Friday, August 15th, 2008

Now that the Launchpad web service API has entered beta, I’ll be posting an update every week about the improvements we make to it. This way you’ll always know what’s going on, and you’ll see when something you want to do becomes possible.

Web service improvements

This week I made one major change to the web service itself. There’s now a special top-level resource that’s an alias to “you” on Launchpad. This is a nice convenience when you’re writing scripts for yourself, but it’s practically essential if other people are going to be running your program.

Here’s how to get a reference to the person who’s running the script, using launchpadlib, our Python interface to the web service.

>>> me = launchpad.me
>>> print me.name
leonardr

If you’re not using launchpadlib, GET the service root at https://api.staging.launchpad.net/beta/, and you’ll see the URL to this resource as ‘me_link’. When you GET that URL you’ll be redirected to your own user account.

launchpadlib improvements

I spent most of my time working on launchpadlib. Apart from some bugfixes and performance improvements that you won’t even notice, I made three big improvements.

Introspection

Previously, to see what capabilities a launchpadlib object had, you had to check the reference documentation. (That documentation is two weeks out of date, by the way; we’ll be fixing that next week.) Now you can just call dir() on an object, and all of its Launchpad-derived attributes and methods will show up in the list. If you only want to see the Launchpad attributes or methods and not all the internal launchpadlib stuff, you can check lp_attributes or lp_operations. This code shows what you can do with a launchpadlib person object:

>>> me.lp_attributes
['self_link', 'resource_type_link', 'longitude', ... 'homepage_content']

>>> me.lp_operations
['addMember', ... 'setLocation']

Slices

The second new feature is the ability to slice Launchpad collections as though they were Python lists. Here’s some code that gets the 10 most recently filed bugs in Launchpad.

>>> recent_bugs = launchpad.bugs[:10]
>>> [bug.id for bug in recent_bugs]
[258042, 258041, 258040, 258039, 258038, 258037, 258036, 258033, 258032, 258030]

Previously, the only way to do this was to iterate over launchpad.bugs and insert a break statement when you’d had enough, which was very awkward.

Loading from bookmarks

The third new feature is the ability to bookmark launchpadlib objects and go back to them later, the way you can bookmark web pages in your browser. Here’s launchpadlib code to acquire a bug.

>>> a_bug = launchpad.bugs[251497]
>>> print a_bug.title
Make it possible to instantiate a resource from a URL

I can play around with that bug all I want within a Python session, but if I exit the Python session the bug will disappear. If I want to get the bug back later, I’ll need to find it again from scratch. Unless I store the bug’s unique ID (also known as its URL).

>>> print str(a_bug)
https://api.staging.launchpad.net/beta/bugs/251497

At this point I can write that string to a file or database. Later on, a different process might come online and load the string back into memory. That process can get the bug object back by passing the bug’s URL into launchpad.load().

>>> a_bug = launchpad.load("https://api.staging.launchpad.net/beta/bugs/251497")
>>> print a_bug.title
Make it possible to instantiate a resource from a URL

Pretty simple stuff–people have been saving URLs and passing them around to each other for over fifteen years. The advantage of our web service’s design is that it gives you the same power in a scripted environment.

Upcoming work

Next week I plan to spend most of my time on behind-the-scenes performance improvements. You won’t notice anything if you use launchpadlib. If you’re writing your own client, you’ll know what I’m talking about when I say “ETag support.”

Meanwhile, Edwin Grubbs will be working to expose Launchpad’s project registry through the web service.

See you next week!

Legal Page Updates

Tuesday, August 12th, 2008

Hi,

Today I’m happy to announce two changes which appear on the Launchpad Legal page.

  1. The Launchpad Logo, previously unlicensed, is now licensed as “Creative Commons Attribution-No Derivative Works 2.0 UK: England & Wales”. “No Derivative” was chosen to preserve our branding integrity.
  2. The Launchpad Help wiki documentation and the Launchpad News blog, previously unlicensed, are now licensed as “Creative Commons Attribution 2.0 UK: England & Wales”.

These changes have been made in response to our users and other commercial entities inquiring if they can display/reuse/remix these items. Previously, any non-Launchpad use required explicit permission (except as permitted by fair-use).

Please visit the Launchpad Legal page for the full details and links to the Creative Commons Licenses.

Joey Stanford

Survey about Launchpad’s upstream bug workflow

Saturday, August 9th, 2008

As we’ve spoken about before on this blog, one of the cool things about Launchpad’s bug tracker is that it can link bugs together, regardless of whether they’re tracked in Launchpad or an external bug tracker.

This is great for Ubuntu, where people report issues against an Ubuntu package of an upstream project. Jorge Castro works on Ubuntu’s community team and wants to know how we could improve this for upstream projects.

So, if you’re from an upstream project and have an opinion on how we can improve the workflow between Launchpad and your external bug tracker, take Jorge’s survey.

Launchpod on last.fm

Friday, May 23rd, 2008

Launchpod’s now up on the fantastic last.fm.

Help us look like we’re the cool kids in town by listening to Launchpod in a player that supports scrobbling đŸ™‚

Take a look at the Launchpad team artist page.

Launchpad Logo Contest Winner Announced

Friday, May 16th, 2008

We’re very pleased to announce the results of the Launchpad Logo Contest!
(See https://help.launchpad.net/logo)

The number and quality of submissions took all of us by surprise. We are
immensely pleased with the results and are in awe at what the community
has done. We had so many interesting designs that it was very difficult for
us to declare a single winner.

However, there was one design that we felt embodied what Launchpad is all
about. We were impressed by how it summarised so much about Launchpad and
yet remained beautifully simple.

So, we’re delighted to say that the winner is Eugene Tretyak!

You can view his design here: https://help.launchpad.net/logo/winning-entry

The center of the design represents how Launchpad makes it easy for
people to collaborate and connect with one another, while the surrounding
facets represent the different services that Launchpad provides.

Above all, it shows that all projects are themselves a gem and, when
combined with other gems, can turn into something brilliant.

Eugene is both an Ubuntu member and Kubuntu developer and will receive
an official Ubuntu Messenger Bag.

There are also two runners-up whose designs made the selection process very
challenging for us. Mariana Ravicole and Ambroise Coutand will each receive
a 25 GBP gift certificate to the Canonical Store in recognition of their
highly competitive and very popular designs.

Additionally, we would also like to give an honourable mention to Donn
Ingle for his contributions. Donn’s varied designs were a popular
favourite.

Finally, the Launchpad Team would like to thank everyone who participated
in the contest. We are humbled by the response and are deeply thankful to
all the participants.

Joey Stanford

Your questions for the Launchpad podcast

Thursday, May 8th, 2008

Over the next couple of weeks we’re going to record a brand new Launchpad podcast.

In it we’ll talk to projects about how they’re using Launchpad and also to members of the Launchpad team.

Perhaps the most important part will be questions from you. Whatever you want to know about Launchpad, ask us on the podcast help wiki page.

Also, if you’ve got a suggestion for a name for the podcast or a Creative Commons licensed theme tune, send it over to feedback@launchpad.net! Best suggestion gets a hearty handshake.

Launchpad Configuration Migration

Friday, April 18th, 2008

Hi,

Since the last Launchpad release you may have noticed a few emails and blog
posts referring to unexpected issues with Launchpad. I thought you might
like to know more about what was causing them, and how we are addressing them.

Launchpad’s operational environment is hosted on several machines in order to
provide adequate response times given our user load. Previously, we had to
maintain separate, and complex, configuration settings for each of the servers.
This was not very conducive to developing and deploying new features, nor
supporting the existing infrastructure. The situation was becoming
unmaintainable, and we had made careful plans to resolve these problems.

To address this limitation, we migrated the existing configuration settings
over to a standard, site-wide, hierarchical system. We’re confident that this
new configuration system will also provide us with a much more robust, stable
and maintainable operational environment. However, the rollout of this new
system has resulted in an undesirable level of shake-out due to the
complexities of the Launchpad services involved and the complexities of the
old configuration system.

On behalf of the entire Launchpad Development Team, I’d like to offer our
sincerest apologies for any inconvenience this may have caused you. We ask you
for your continued understanding as we seek to improve the Launchpad service.

Joey Stanford
Launchpad Releases Team Manager

Using Launchpad accounts to manage your local ssh logins: launchpadduser.py

Saturday, March 22nd, 2008

Glyph posted an interesting script to the launchpad-users mailing list that I thought was definitely worth sharing:

Quite often, I’ve discovered that I want to add someone (who already has an account on launchpad) to my system so they can log in and attach to my ‘screen’ session; however, I will inevitably screw up typing in the finger information, setting permissions on their .ssh directory, assigning them a bogus password, etc. Here’s a simple Python script that will add a user to your system with the same username as on Launchpad, and with their SSH keys already set up so they can log in, but no system password.

You can download the script from http://people.ubuntu.com/~kiko/launchpadduser.py.

It requires adduser, wget and python. You’re expected to run this as root, so the usual warnings apply, but it’s simple enough for you to audit on your own. And there is no error handling! A usage example:

root@beetle:~# python launchpadduser.py kiko
Adding user `kiko' ...
Adding new user `kiko' (1012) with group `users' ...
Creating home directory `/home/kiko' ...
Copying files from `/etc/skel' ...
--09:43:36--  https://launchpad.net/~kiko/+sshkeys
           => `/home/kiko/.ssh/authorized_keys'
Resolving launchpad.net... 91.189.90.211
Connecting to launchpad.net|91.189.90.211|:443... connected.
HTTP request sent, awaiting response... 200 Ok
Length: 860 [text/plain]

100%[=============================================>] 860           --.--K/s             

09:43:38 (9.49 MB/s) - `/home/kiko/.ssh/authorized_keys' saved [860/860]

And presto:

kiko@anthem:~$ ssh beetle
Linux beetle 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686
kiko@beetle:~$ 

Logo competition closing soon!

Monday, March 17th, 2008

This past few weeks, we’ve had a whole load of high quality entries to our logo competition. We’re heading fast towards the 31st March deadline, so if you want to take part you’d best fire up Inkscape pretty sharpish!

Back in January I shared a couple of the entries we’d had at that time. As a bit of inspiration, in case your arty side is twitching, here are some of the proposed logos we’ve had since.

Donn Ingle’s sixth entry to the competition introduces a touch of the natural world:

Leaf logo

Siim Sindonen’s stylised blue rockets show the community support between projects, people and teams in Launchpad:

Light blue rocket piggybacking on a darker blue rocket

Thorsten Wilms offers this shiny green rocket:

Green rockets

And Marco Tessarotto’s entry puts me in mind of Marvin the Martian but I’m not sure why:

Dark green rocket

See all the entries on our submissions page!

February’s users meeting

Wednesday, February 20th, 2008

It’s coming up to the end of the month again and so it’s almost time for the Launchpad users meeting!

When: 09.00 – 10.00 27th February UTC.
Where: #launchpad-meeting on Freenode.
Find out more: Add your items to the agenda.