Faruk Akgul

A Python Development Story: Jenkins-CI meets web.py and PyCharm

May 06, 2012 | View Comments

Jenkins-CI is a continuos integration platform. Setting up Jenkins and installing plugins is quite easy since it does everything automatically.

Jenkins-CI

We use the following tools with Jenkins-CI:

  • git: Our vcs choice
  • nose: Unit test library.
  • sloccount: Calculates the lines of code.
  • PyLint: Static analyzer
  • clonedigger: Detects duplicate code.
  • coverage: Measures code coverage by monitoring the program, traces hooks, notes which parts have been executed, which parts could have been executed but wasn't.
  • pep8: Coding style.

The following plugins are necessary:

  • git
  • Sloccount
  • Python
  • Violations
  • Warnings
  • xUnit

All these plugins could be installed from plugin manager.

** There's also ShiningPanda plugin which adds some useful builders such as virtualenv but we've not tried it.

Jenkins takes care of everything. It clones your git repository and does the necessary steps.

Shell Build Steps

Shell build steps are straightforward. For example;

for filename in `find . -name *.py | egrep -v '^./modules/'`; do pep8 --ignore=E111 $filename; done || :

PyCharm

PyCharm is a Python IDE from JetBrains. In addition to plain Python, it can syntax highlight and check for errors for Cython, CoffeeScript, Mako/Jinja2 templates as well. You could connect to database and work on database tables too!

It supports git, virtualenv, pip (and probably lots of other things I've not noticed yet).

For example; Cython highlighting and error and spelling checking:


Cython highlighting and error and spelling checking

and when you connect to your database in PyCharm;

Pretty cool, huh?

The rest is web.py, SQLAlchemy, Mako, gevent and ZeroMQ.

Related Posts

  1. A Python Development Story: Part 2
  2. A Python Development Story: Part 3 - web.py Skeleton
Share:Tweet · reddit

blog comments powered by Disqus