Agora Octave: Update #1

« Back to blog :: August 10, 2012

Agora Octave: Update #1

This week, I read more about the specifications and code for Agora Octave and started investigating some of the solutions. I also made my first few commits to the Mercurial repository (most were minor changes involving settings.py).

This week

Reading specifications and code

To get a better understanding of the project, I spent some time reading and re-reading the current README file, the somewhat spartan wiki page, and the code (all the .py files). I also read through this recap of Agora-related discussion during OctConf 2012, which was brought to my attention via the mailing list.

Changes to settings.py

Most of the edits were whitespace-related (changing 2-space indentation to 4-space indentation, adding/removing it in accordance with PEP 8, etc).

There was also a small compatibility issue with Django 1.4 that I experienced when I first tried to run it, which I fixed in this commit. More information on that can be found here.

Managing dependencies with pip

pip is a widely used package installer for Python. It has a great system for managing project-wide dependencies, and works very well in conjunction with virtualenv.

To get the list of required dependencies, I first set up a virtual environment with virtualenv and then installed all the required modules through pip. I then exported the requirements to a file named requirements.txt with pip freeze > requirements.txt, as is often the convention (the file was later renamed to pip-requirements, which does look nicer).

Installing the required dependencies is then a simple matter of running pip install -r pip-requirements. This system is especially useful when operating within a virtualenv in which only the default Python modules (and pip) are installed.

Mercurial

Before making my first commit, I read through the Mercurial commit message guidelines on the Octave wiki. They seemed pretty similar to the conventions I use for git, so I didn’t have any problems there. One thing that I found somewhat unsettling at first was the lack of output colours, but enabling the colour extension was a simple matter of adding

[extensions]
color =

to my ~/.hgrc, so that was fine.

Next week

OpenID for authentication

It was brought up on the mailing list that we should use openID for authentication. Luckily, there are many libraries for accomplishing this in Django - this StackOverflow answer suggests that django-openid-auth is a good choice. Available uner the BSD license, like some of the current dependencies. Next week I try it out, and if it all goes well I will add it to the dependencies.

Design mockup

For next week’s update, I’ll include some mockups (images, maybe a static webpage) of redesign proposals. The theme will be consistent with Octave’s - #D45500 (orange), #0791C1 (blue), #808080 (grey) - as well as the light grey used in the logo (#EEEEEC). I’ll also send it out to the mailing list for feedback.

Continuous integration

My initial plan for ensuring that unit tests are run regularly, against multiple version of Django and Python, was to use the continuous integration tool Travis. However, since it integrates exclusively with Github, I sent an email to the octave-maintainers mailing list about other possibilities. Hydra (a paper about it is available here) was brought up. Next week, I’ll look into it more to see if it’s the right tool for the job.

Updating the readme

I’ll edit the readme to reflect the improved dependency management system with pip and the new pip-requirements file, and will ensure that the to-do list is up-to-date.

Basic code maintenance

When reading through the existing code, I noticed some areas that could be improved, as well as some minor organisation and whitespace-related changes that could be made. I’ll make any such changes next week.

Position in timeline