Python software metrics- my first useful OS project?
I’ve tried to open-source code quite a few times, but the projects have been niche enough that they haven’t been very useful. Well, I finally have something universally useful.
I’ve take an interest in code metrics recently (as documented on this blog) and I have been quite upset to learn that there are few good tools for measuring them in Python code. PyLint and PyChecker and the like are not what I’m talking about- I want dependency graphs, measure of cyclomatic complexity, automatic coverage analysis, etc.
So basically what I’m doing is creating a framework that wraps a bunch of existing functionality into an easy-to-use system, and expands or refactors it where necessary. My goal is to make it a ‘drop in’ system to it will be trivial to get thorough code metrics for your codebase (similar to how simple it is to do in Visual Studio).
Right now I’ve created a SLOC (Source Lines of Code) generater, a wrapper for nose and coverage, and hooked it up to pygenie to measure Cyclomatic Complexity- which is unfortunately going to need a significant refactoring, so I won’t be able to fork it directly. I’ll be hooking it up into our automated test framework at work this week as well for some battle testing. I’m 100% sure there’s a good deal of extensibility and configuration adjustments I’ll need to make to support alternative setups. Next up will be automatic generation of dependency graphs (which doesn’t look easy at all, unfortunately). And writing tests (this is the first project that I didn’t sort-of-TDD in a while). Oh, and getting it into Google Code.
Is this something you guys can see hooking into your codebases? Do you see the value of and want to find out metrics of your codebases?
Oh and it’s tentatively called ‘pynocle’, if you have a better name I’d love to hear it.