The most exciting summer of my life has now come to an end. Its GSoC deadline and I can't believe how fast the time flies.

My project has made significant progress and has covered almost all deliverables mentioned in my proposal. The Mailman CLI now has a pretty usable and useful command line interface.

The Command line tools was completed before the mid term evaluations. After the mid term evaluations, most of the time was directed towards the Mailman shell. However few changes and improvements were made to the command line tools too. One of the major additions made to the tools were the the backup and restore functionalities. Also, an export to CSV feature is also included with all the display commands aka show commands. Apart from these, a few general changes also affect the command tools. The changes are largely due to the feedback from Steve. The major changes as per Steve's feedback include the following

  • Refactoring the get_listing method, which was repeated in every class. The method was made a generic method and moved to the lib/utils. The class specific code in the method is handled by passing the attribute list to the method and the corresponding value was obtained by using the getattr function.
  • Code was refactored at many instances where unnecessary indent was created due to unwise use of conditionals and try-catch blocks.
  • The coloring part is made more configurable by setting the colors as module level constants and moving the colors to a separate file.
  • The connection verification part was previously an expensive due to a probably expensive database query, which as replaced by a quick, database independent method.
  • The CLI configuration file was dropped as the details were already stored in Mailman config. 
  • The connection method is now unified and global, and reads the credentials from the mailman config. The connection verification part is now handled by this method
  • Exceptions were verified before reporting the error, which previously `assumed` the error message.
The next part of the project, which filled the post mid term phase was the development of the command shell, which give Mailman a custom shell. This part of the project was rewritten many times due to improper planning and at the end, the shell was built in the best possible way. Initially the shell was built in a bad way, by using bare string processing and array operations to parse the commands for arguments. This code looked ugly and was too error prone and inflexible. This was replaced by a better, but not the best way, by writing regular expressions for each command. I successfully completed this task and I even built regexes for my most complex commands, the update preference command. I discussed this approach in the python IRC, asking for a good error reporting method for regex matching, and my method was remarked as a "recipe for failure" and advised that I am to use a parser.

I began researching on the various parser libraries available for python and I landed in the PLY module, which seemed interesting and simple to use. My prior experience in using lex and YACC proved handy in building my parser. In a week's time, I was done porting my shell from regex to YACC. The error reporting was handled beautifully by the PLY and in addition, the command usage help string is also printed in case of an error.

The filtering was handled by a separate class named Filter that supports various like of filters like equality, regular expression matching list searching etc. The Filter class makes it easy to add new Filters if any, in future.

Unit tests were written for the work until now and they are executed using nosetests. The CLI is now install-able using the python dev-tools, ie, python setup.py install. The installation creates a new executable command named mmclient, which can be used to run the commands or the shell.

The final tasks was to make the docs better by making them sphinx compatible. The task involved ordering and verification of the documentation. Inline code highlighting and file hierarchy of the docs was fixed in the last revision, r72, made on 17/08/2014. The docs now look pretty decent and useful.

I would be continuing the development of the CLI by adding more features like PostgreSQL support for the backup and restore tool. Also the shell environment has some scope for improvement. Apart from that, the project is fully complete and functional.

Finally, I would like to quote my heartfelt thanks to Google for hosting such a great event and giving students  such a great opportunity to be a part of huge projects under the mentorship of great people, who are geographically apart. I would like to thank my primary mentor, Stephen J Turnbull, who inspite of his busy life, found room for my project, right from the proposal period, and for doing extensive scrutiny and providing feedback for my code. I would like to thank Abhilash Raj, with whom I regularly discussed about my work, code and roadblocks, usually via the IRC. I would like to thank Barry Warsaw, who shed light upon how my project should look like, from a user's perspective. He is one of the people who responds to almost each one of my mails to mmdev mailing list. I would like to thank Terri Oda and Florian Fuchs, who are the org admin and co admin of Python Software Foundation for this year's Summer of Code, for their support and great work they did in managing the PSF's Summer of Code.