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).
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).
Managing dependencies with pip
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
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.
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
to my ~/.hgrc, so that was fine.
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.
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 -
#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.
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
- August 1-15: Check out codebase, get it running; read all the code and documentation; start learning Mercurial
- August 16-31: Start working on design; start mocking up models and routes for the components
- September 1 - October 15: Work on the core components, with as much test coverage and documentation as is feasible; start implementing the views, models and templates
- October 16-31: Ensure that documentation is thorough and up to date; write any remaining tests that need to be written; test out the user interface and fix any bugs