Not My Idea

Carnets Web d'Alexis Métaireau

Archive for juin, 2010

Use Restructured Text (ReST) to power your presentations

one comment

Wednesday, we give a presentation, with some friends, about the CouchDB Database, to the Toulouse local LUG.

Thanks a lot to all the presents for being there, it was a pleasure to talk about this topic with you. Too bad the season is over now an I quit Toulouse next year.

During our brainstorming about the topic, we used some paper, and we wanted to make a presentation the simpler way.

First thing that come to my mind was using restructured text, so I’ve wrote a simple file containing our different bullet points.

In fact, there is quite nothing to do then, to have a working presentation.
So far, I’ve used the rst2pdf program, and a simple template, to generate output.

It’s probably simple to have similar results using latex + beamer, I’ll try this next time, but as I’m not familiar with latex syntax, restructured text was a great option.

Here are the final PDF output, Rhe ReST source, the theme used, and the command line to generate the PDF:

rst2pdf couchdb.rst -b1 -s ../slides.style

Written by Alexis Metaireau

juin 25th, 2010 at 7:17

Posted in Presentations

Tagged with , ,

GSOC Distutils first report

leave a comment

As I’ve been working on Distutils2 during the past week, taking part of the GSOC program, here is a short summary of what I’ve done so far.

As my courses are not over yet, I’ve not worked as much as I wanted, and this will continues until the end of June. My main tasks are about making installation and uninstallation commands, to have a simple way to install distributions via Distutils2.

To do this, we need to rely on informations provided by the Python Package Index (PyPI), and there is at least two ways to retreive informations from here: XML-RPC and the "simple" API.

So, I’ve been working on porting some Distribute related stuff to Distutils2, cutting off all non distutils’ things, as we do not want to depend from Distribute’s internals. My main work has been about reading the whole code, writing tests about this and making those tests possible.

In fact, there was a need of a pypi mocked server, and, after reading and introducing myself to the distutils behaviors and code, I’ve taken some time to improve the work Konrad makes about this mock.

A PyPI Server mock

The mock is embeded in a thread, to make it available during the tests, in a non blocking way. We first used WSGI and wsgiref in order control what to serve, and to log the requests made to the server, but finally realised that wsgiref is not python 2.4 compatible (and we need to be python 2.4 compatible in Distutils2).

So, we switched to BaseHTTPServer and SimpleHTTPServer, and updated our tests accordingly. It’s been an opportunity to realize that WSGI has been a great step forward for making HTTP servers, and expose a really simplest way to discuss with HTTP !

You can find the modifications I made, and the related docs about this on my bitbucket distutils2 clone.

The PyPI Simple API

So, back to the main problematic: make a python library to access and request information stored on PyPI, via the simple API. As I said, I’ve just grabbed the work made from Distribute, and played a bit with, in order to view what are the different use cases, and started to write the related tests.

The work to come

So, once all use cases covered with tests, I’ll rewrite a bit the grabbed code, and do some software design work (to not expose all things as privates methods, have a clear API, and other things like this), then update the tests accordingly and write a documentation to make this clear.

Next step is to a little client, as I’ve already started here I’ll take you updated !

Written by Alexis Metaireau

juin 4th, 2010 at 12:27

Posted in distutils2

Tagged with , ,