I gave a talk at the Python User group in the Netherlands (PUN) with the goal of getting everyone to automate their projects more:
A project is a bunch of code and a bunch of configuration and probably some scripts. Which you need to collect from multiple places, initialize, convert, perhaps compile and what have you.
Buildout allows you to write your own extensions (called “recipes”). Well, write those extensions when you have custom tasks. They’re not hard. Examples from The Health Agency:
Of course you have tests. And if you don’t, make sure you can run a
setup.py test or
bin/test that tests a big part of your software.
You can do one extra step of automation that really hits the jackpot: a buildbot. Buildbot detects changes to your (svn) repository, makes a clean checkout, builds your project (here’s where the build tool comes in!), runs the tests and reports on the success. That is Quality Control with Capital Letters. (More info). No more of the following:
Example: at The Health Agency, an essential part of our work is health documentation which is stored in amongst others a docbook xml variant. So apart from checking all our code, we set up a buildbot for all content checkouts (link checking, xml validity checking, etc.). The feel of reliability and solidity you get is amazing.
A big part of quality is in the regular small things you do. Often there’s a sloppy way and a good way to do it. Make the good way the easiest. Laziness can work for you! Use scripts and skeletons.
bin/fullreleaseit takes half a minute without errors. Guess what gets used? Right.
bin/coveragecall (provided you use buildout, with tha.coverage). Just make it easy to do. The call even opens your webbrowser with the coverage report. Lazy for the win! (More info).
Automation is nice work. It ensures quality. Get into the habit. Do it also for your own private tasks. It pays off in spades.
My slides are at http://www.slideshare.net/rvanrees/practical-project-automation
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):