My first useful open source project, pynocle, is finally ready for me to talk about.
Get the code via Hg/GoogleCode here: http://code.google.com/p/pynocle/
Browser the pynocle-generated metrics for pynocle here: http://pynocle.googlecode.com/hg/exampleoutput/index.html
pynocle is a series of modules designed to provide the most comprehensive code analysis of python available from a single source. It is designed to be as dead simple to use as possible- create/configure a pynocle.Monocle object, and run it. You can get by quite well only knowing 2 methods on a single object.
Right now, pynocle has support for:
- Cyclomatic Complexity
- Coupling (afferent and efferent)
- Google PageRank-like algorithm for measuring coupling (requires numpy)
- Source lines of code
- Dependency diagrams (requires GraphViz Dot)
- Coverage (requires coverage module)
- More configuration support. Right now this is truly just an API, which I prefer, but it may make it easier if it can be configured through text.
- Runnable from commandline. I plan to make the whole thing runnable, as well as individual components.
- Python easy_install/PyPI support. Right now, you do it all by hand.
- Get it running on Linux. I am catching a WindowsError in a few places and also am missing the filetype indicator at the top of the files. I’m not a *nix guy, so if you can help with this, I’d love it (should be simple).
- Improve rendering of reports. Right now, most are in plain text (except dependency images, and coverage html report). I’d like to make them all some form of HTML.
- Add more metrics. Believe it or not, I’m pretty happy with the current metrics, but I’ll be adding more as time goes on and I get ideas or people ask.