Shortly after the Ubuntu App Showdown earlier this year, Didier Roche and Michael Terry kicked off a series of discussions about a ground-up re-write of Quickly. Not only would this fix many of the complications app developers experienced during the Showdown competition, but it would also make it easier to write tools around Quickly itself.
Unfortunately, neither Didier nor Michael were going to have much time this cycle to work on the reboot. We had a UDS session to discuss the initiative, but we were going to need community contributions in order to get it done.
I was very excited about the prospects of a Quickly reboot, but knowing that the current maintainers weren’t going to have time to work on it was a bit of a concern. So much so, that during my 9+ hour flight from Orlando to Copenhagen, I decided to have a go at it myself. Between the flight, a layover in Frankfurt without wifi, and a few late nights in the Bella Sky hotel, I had the start of something promising enough to present during the UDS session. I was pleased that both Didier and Michael liked my approach, and gave me some very good feedback on where to take it next. Add another 9+ hour flight home, and I had a foundation on which a reboot can begin.
Where is stands now
My code branch is now a part of the Quickly project on Launchpad, you can grab a copy of it by running bzr branch lp:quickly/reboot. The code currently provides some basic command-line functionality (including shell completion), as well as base classes for Templates, Projects and Commands. I’ve begun porting the ubuntu-application template, reusing the current project_root files, but built on the new foundation. Currently only the ‘create’ and ‘run’ commands have been converted to the new object-oriented command class.
I also have examples showing how this new approach will allow template authors to easily sub-class Templates and Commands, by starting both a port of the ubuntu-cli template, and also creating an ubuntu-git-application template that uses git instead of bzr.
What comes next
This is only the very beginning of the reboot process, and there is still a massive amount of work to be done. For starters, the whole thing needs to be converted from Python 2 to Python 3, which should be relatively easy except for one area that does some import trickery (to keep Templates as python modules, without having to install them to PYTHON_PATH). The Command class also needs to gain argument parameters, so they can be easily introspected to see what arguments they can take on the command line. And the whole thing needs to gain a structured meta-data output mechanism so that non-Python application can still query it for information about available templates, a project’s commands and their arguments.
Where you come in
As I said at the beginning of the post, this reboot can only succeed if it has community contributions. The groundwork has been laid, but there’s a lot more work to be done than I can do myself. Our 13.04 goal is to have all of the existing functionality and templates (with the exception of the Flash template) ported to the reboot. I can use help with the inner-working of Quickly core, but I absolutely need help porting the existing templates.
The new Template and Command classes make this much easier (in my opinion, anyway), so it will mostly be a matter of copy/paste/tweak from the old commands to the new ones. In many cases, it will make sense to sub-class and re-use parts of one Template or Command in another, further reducing the amount of work.
If you are interested in helping with this effort, or if you simply want to take the current work for a spin, the first thing you should do is grab the code (bzr branch lp:quickly/reboot). You can call the quickly binary by running ./bin/quickly from within the project’s root.
Some things you can try are:
./bin/quickly create ubuntu-application /tmp/foo
This will create a new python-gtk project called ‘foo’ in /tmp/foo. You can then call:
./bin/quickly -p /tmp/foo run
This will run the applicaiton. Note that you can use -p /path/to/project to make the command run against a specific project, without having to actually be in that directory. If you are in that directory, you won’t need to use -p (but you will need to give the full path to the new quickly binary).
If you are interested in the templates, they are in ./data/templates/, each folder name corresponds to a template name. The code will look for a class called Template in the base python namespace for the template (in ubuntu-application/__init__.py for example), which must be a subclass of the BaseTemplate class. You don’t have to define the class there, but you do need to import it there. Commands are added to the Template class definition, they can take arguments at the time you define them (see code for examples), and their .run() method will be called when invoked from the command line. Unlike Templates, Commands can be defined anywhere, with any name, as long as they subclass BaseCommand and are attached to a template.Read more