8

Feelin’ hot hot hot

Published by Matthew Revell October 16, 2008 in Cool new stuff, PPA

If you’ve ever come to file a bug and found that it’s already been reported, you may have wanted to let the project know that you too have been affected.

Trouble is: many projects find “me too” comments unhelpful because they don’t add much to the discussion.

Launchpad’s new “This bug affects me too” feature lets you record just that but without the guilt! Give it a go in our staging environment.

We’ll use the “me too” data in future to help projects identify “hot” bugs.


2

Recipe for uploading files via the API

Published by Brad Crittenden October 15, 2008 in API

As part of the API beta, we’ve recently exposed a number of new features that work with the Launchpad registry. One outcome is the ability to simplify part of the release management that has been cumbersome.

You can now have your build system generate all of the files you wish to distribute, such as installers, change logs, README files, and upload them automatically using the API. Below is a recipe to perform the task. You can take this idea and customize it as you need.

 

import launchpadlib

FILE_TYPES = dict(tarball='Code Release Tarball',
                  readme='README File',
                  release_notes='Release Notes',
                  changelog='ChangeLog File',
                  installer='Installer file')

def upload_file(lp, project_name, release_version,
                filename, description,
                content_type, file_type,
                signature_filename=None):
    """Upload a file, and optionally its signature, to Launchpad.

    :param lp: Launchpad instance
    :param project_name: the project that owns the uploaded file
    :param release_version: the release the file will be associated, e.g. 1.0
    :param filename: the name of the file to be uploaded.  For this demo it is
                     the name that will be associated with the upload and the
                     file where the contents reside, in the current directory
    :param description: a short sentence describing the file like 'minimal
                        installer'
    :param content_type: the content MIME type, e.g. 'text/plain'
    :param file_type: one of the acceptable file types for upload as shown in
                      the FILE_TYPES dictionary.
    :param signature_filename: the optional name of the GPG signature file.
    """
    try:
        # Look up the project using the Launchpad instance.
        proj = lp.projects[project_name]
        # Find the release in the project's releases collection.
        release = None
        for rel in proj.releases:
            if rel.version == release_version:
                release = rel
                break
        assert release is not None, (
            "Release %s could not be found for project %s." % (release_version,
                                                               project_name))

        # Get the file contents.
        file_content = open(filename, 'r').read()
        # Get the signature, if available.
        if signature_filename is not None:
            signature_content = open(signature_filename, 'r').read()
        else:
            signature_content=None
        # Create a new product release file.
        product_release_file = release.add_file(filename=filename,
                                                description=description,
                                                file_content=file_content,
                                                content_type=content_type,
                                                file_type=file_type,
                                                signature_filename=signature_filename,
                                                signature_content=signature_content)
    except launchpadlib.errors.HTTPError, e:
        # Handle error here.
        print "An error happened in the upload."
        print e.content
        product_release_file = None

    return product_release_file is not None

 

Now that we’ve defined the routine upload_file you can call it as shown here. The handle lp is an instance returned from passing your credentials to launchpadlib.launchpad.Launchpad. This snippet of code shows how you would use the previous routine to upload your files and signatures.

 

    # We assume 'lp' is a valid Launchpad instance.
    # Information about the project and release.
    proj_name = 'acme-widgets'
    release='1.0'
    # Information about the file and signature.
    filename = 'README.txt'
    description = 'python installer script'
    content_type = 'text/plain'
    file_type = FILE_TYPES['readme']
    # The signature file is created by executing:
    # gpg --armor --sign --detach-sig <file>
    signature_filename = 'README.txt.asc'

    upload_file(lp, proj_name, release, filename, description, content_type,
                file_type, signature_filename)

 

Let me know if this recipe works out for you by commenting on this post. Also, we’d love to see snippets of code that you’ve found useful in working with the API. Post them here or email to feedback@launchpad.net


0

Launchpod episode 11: Launchpad teams and OpenID, future of LP UI and community help

Published by Matthew Revell October 13, 2008 in Podcast

Launchpod: the Launchpad team podcast!

Hosts: Matthew Revell, Graham Binns and Joey Stanford.
Theme: Obscurity by Barry Warsaw.

Talk to us! Episode 13 of Launchpad will be recorded in London at the end of October. Send us your questions because the full Launchpad team will be available to take them!

Download ogg vorbis file.

Podcast feed.


0

Launchpad offline 16th October 00.00 – 02.00 UTC

Published by Matthew Revell October 9, 2008 in Notifications

We’re releasing Launchpad 2.1.10 on the 16th of October. While we roll-out the new code, Launchpad will be unavailable for up to two hours.

Launchpad offline: 00.00 UTC Thursday 16th October
Expected back before: 02.00 UTC Thursday 16th October

See the Launchpad News blog after the roll-out for details of what’s new.


0

Getting help with Launchpad

Published by Matthew Revell October 6, 2008 in General

Seattle telephone operators
Recent scene at Launchpad HQ

There are few things more frustrating than working on something and then being held up because you can’t get the help you need. I know this all too well: my quest for world domination has long been stalled because the sonic screwdriver help-line people never answer my emails.

With Launchpad, we’re trying something new to make sure you get the help you need. Each week day there’s a named member of the Launchpad team whose job is to answer your questions, whether in #launchpad, in Launchpad Answers, on launchpad-users or to help@launchpad.net.

This means that on top of the usual cast of Launchpad types in #launchpad, for eight or so hours each day you’ll have a named contact that you can ping for help.

You can see which person’s on duty by checking the Help Rotation page on the Launchpad help wiki and also by looking at #launchpad’s channel topic.

Let us know what you think of the new help rotation and how we can improve it.

Telephone operators photograph from Seattle Municipal Archives. Creative Commons licensed.


0

Launchpod episode 10 – API and bug plugins

Published by Matthew Revell October 3, 2008 in Podcast

Launchpod: the Launchpad team podcast!
Hosts: Matthew Revell, Graham Binns and Joey Stanford.
Theme: Obscurity by Barry Warsaw.

Send us your ideas and questions to feedback@launchpad.net!


Download ogg vorbis file
.

Podcast feed.


0

Launchpad Code down-time Monday 6th October 2008

Published by Matthew Revell October 2, 2008 in Notifications

On October 6th Launchpad’s code hosting and browsing will be unavailable for around four hours from 22.00 UTC.

During this down-time, the following services will be unavailable:

Mirrors and imports will return to their normal schedule following the down-time.

Non-code hosting parts of Launchpad should be unaffected.

We’re taking these services offline to upgrade the hardware that powers Launchpad’s code hosting service. Not only will this help Launchpad handle the increasing increasing number of people using code hosting but will also enable us to introduce exciting new features in coming Launchpad releases.

If you have any questions or comments, please post them here.


0

This week in Launchpad’s web API

Published by Leonard Richardson September 26, 2008 in General

You didn’t expect it, but here it is. “This Week in Launchpad’s Web API” returns for one more week! This week we’re pleased to announce that you can now search the bug tasks associated with a project, project group, distribution, or milestone. We know a lot of people have been waiting for this feature.

>>> launchpadlib_project = launchpad.projects['launchpadlib']
>>> me = launchpad.me
>>> my_launchpadlib_bugs = launchpadlib_project.searchTasks(assignee=me)

The interface to searchTasks is very similar to the interface to Launchpad’s advanced search form. That fact should get you started searching easily.

The other bug news is that you can now post a comment to a bug by invoking newMessage on the bug.

Release files are now exposed through the web service. This means you can now integrate release management tools into Launchpad. When you do a release of your program, the same tool that packages the release can upload the release file to Launchpad and make a Launchpad release for it.

>>> series = launchpad.projects['myproject'].series[0]
>>> release = series.addRelease(
...     version=new_item_name, code_name='sumo',
...     summary='super new beta',
...     description='The be-all end-all version for the next century.',
...     changelog='Fixes security bug. Adds external support.')
>>> release.add_file(filename="release.tgz",
...     file_content="[binary data]",
...     content_type="application/x-gzip")

Finally, we’ve changed launchpadlib so that when you upload a file, you need to set the filename you want the file to have on the server side. Previously, there was no way to set the filename.

>>> release_file = release.files[0]
>>> filehandle = release_file.open("application/x-gzip", "new-filename.tgz", "w")
>>> ...


0

This week in Launchpad’s web API

Published by Leonard Richardson September 18, 2008 in API, Cool new stuff, General

This status report was put off until today because the edge site was frozen. This update is huge. We’ve made one change to launchpadlib, exposed a whole lot of Launchpad’s project registry, and published branches for the first time.

Since the development cycle is over, the next update will probably be in two weeks.

Read the rest of this entry »


0

Where is everyone? Maps on profile pages

Published by Matthew Revell September 17, 2008 in Cool new stuff

Something I love about Launchpad is that I can quickly get a feeling for the people whose work I come across. Some of what you see on a Launchpad profile page is more geared towards knowing the person than their work.

We’ve added a bit more to that “getting to know you” part of the profile page with our new Google Maps mash-up. Now you’ve got the option of showing other people where in the world you are by flagging your location.

This is pretty cool for a bit of fun but when it comes to organising team meetings – in person or online – it becomes really useful. Take a look at the profile page for the Launchpad Developers team. On our team map you get a quick-glance feeling for where in the world members of the Launchpad team are.

Visit your profile page to set your location.


Previous Entries
Next Entries