[Python-projects] pyLint: Speeding up pyLint

Nicolas Chauvat nicolas.chauvat at logilab.fr
Fri May 29 11:31:32 CEST 2009


Hi Julian,

On Fri, May 29, 2009 at 10:45:00AM +0200, Jürgen Hermann wrote:
> > The code for my current project is mission critical and therefore I am
> > running pyLint --errors-only before every commit. This works fine and,
> > as I said, has already saved my b*tt a couple of times.
> > 
> > The only problem with this is that pyLint is comparatively slow. In my
> > project, the unit tests take around 5s to run, pyLint takes 20s.

Any help in getting pylint to run faster will be greatly
appreciated. The usual method applies: profile, work on bootle-necks,
loop.

Running pylint with the --profile=y option will get you some
statistics to work on.

Sylvain, Emile and others from Logilab will help, but they are
currently working on projects with tight deadlines.

> The usual answer to this is using continuous integration,
> e.g. Hudson. Besides making the manual steps involved redundant, it
> also offers other reports via its web interface and emails interested
> parties about problems.
> 
> Python projects have automatic api docs, test & pylint reports, svn
> change history & last build artifact here. Also building in a
> non-developer environment means catching some kind of errors, too
> (dependency ones, for example).

I agree with Jurgen that continuous testing is a good option. At
Logilab, we do it with http://www.logilab.org/project/apycot

The new apycot version is integrated in a web framework
<http://www.cubicweb.org/> and you can see it working at the bottom of
the page http://www.logilab.org/project/logilab-common or on
http://www.logilab.org/projectapycotconfig/logilab-common

The cubicweb-apycot UI clearly needs a bit of work, bit it is
functional. We also use apycot to automate the generation of debian
packages and the updating of our debian repositories, in case that
would of any interest to you.

-- 
Nicolas Chauvat

logilab.fr - services en informatique scientifique et gestion de connaissances  


More information about the Python-Projects mailing list