matt good

musing coding

Archive for March 2005

Python Testing

written by Matt, on Mar 27, 2005 12:06:21 AM.

I just finished my first major use of Python testing tools. I just wrote a patch for Trac to add groups support to its fine grained permissions.

As I started writing the patch I was having trouble wrapping my head around all the different possibilities for conflicting rules and how they should take precedence. I started testing a few of them by hand, but I quickly realized that making sure that I covered all the scenarios was going to be difficult. Thankfully there were some examples in the code for using doctest.

Once I had figured out a couple of things about using doctest, I found it was the first testing tool I've actually enjoyed using. Doctest allows you to write your tests as basic textual documentation, then insert snippets from the Python command line. Doctest will run the command line sections and make sure that the output matches the document. This makes it incredibly easy to write tests, and the tests are quite readable and useful as examples.

On a sidenote, I got a complimentary copy of the Python Cookbook today. They contacted me a while back about using some submissions I had made on the cookbook website, but when they released the list of included recipies none of my submissions seemed to be included, so I wasn't expecting to receive a copy of the book. I actually considered picking up a copy at PyCon, but now I'm glad I waited.

Divmod

written by Matt, on Mar 25, 2005 6:08:32 PM.

The guys from Divmod were here at PyCon and today the gave a little talk about their service.

The basic functionality of their site is to provide a way to collect your email, rss, calendars, etc. into one place and they'll catalog it for easy searching and relating the information together.

They also provide VoIP service and can keep a log of your calls which is tied into the same address book information from your email, etc. Apparently they'll soon be able to let you specify rules about different people trying to contact you, so that email or calls from certain people are important and always go through, or others can get directed to voice mail. This can even be set up to be on a schedule so that people could only get in contact with you during business hours, or other similar rules.

The thing that I found most interesting is that they're working on determining information about references to dates for scheduling appointments. They claim that they'll be able to pick up on phrases like "next Thursday" and determine prompt you if you want to create an appointment about the meeting that you were discussing.

Roundup

written by Matt, on Mar 24, 2005 9:18:36 PM.

Today at PyCon I went to the talk on the Roundup Issue Tracker to see what I could learn from them for use in Trac.

One thing that I realized would be good is to add a QuickStart document for getting the built-in tracd up and running with minimal configuration. As the Trac user base is growing, the installation questions are growing. I think that there are still going to be a lot of people who want to use Trac via Apache. However, I think that if people can get tracd up and running quickly there will be less people that get stuck with nothing running. This should give them a chance to play with Trac a bit, rather than getting hung up on the Apache config right at the beginning and asking a bunch of questions that they'd figure out on their own in a minute if they had a running Trac server.

The feature of Roundup that seemed interesting is their use of email for issue reporting and discussion. This has been requested in Trac several times, but I haven't yet seen a good proposal on the format these emails should have. I liked that Roundup would use the CC list on emails to add new people to the so-called "nosy" list that is notified of changes.

Roundup also supports hook scripts similar to the idea I proposed on the Trac mailing list. I think that this would be a nice way to provide extension points for customizing the Trac event model.

During the talk I had decided I wasn't going to bring up Trac, since I didn't really want to come across as rude by promoting a competing application. However, during the Q&A time following the talk someone asked about Subversion integration. Richard (Rick?) indicated that he thought you could write some shell scripts, etc. to tie the two together, but didn't have a really good answer. So, of course at that point I had to put in a little plug for Trac. Some of the Mac people were taking notes on SubEthaEdit and put the site URL up on there, so I'm hoping some people will check it out.

Best quote of the conference:

When all you have is a hammer screws are stupid