Our friends in the Perl community came up with the concept of KWALITEE: "It looks like quality, it sounds like quality, but it's not quite quality". Kwalitee is an empiric measure of how good a specific body of code is. It defines quality indicators and measures the code along them. It is currently used by the CPANTS Testing Service to evaluate the 'goodness' of CPAN packages. Here are some of the quality indicators that measure kwalitee:
- extractable: does the package use a known packaging format?
- has_version: does the package name contain a version number?
- has_readme: does the package contain a README file?
- has_buildtool: does the package contain a Makefile?
- has_tests: does the package contain tests?
Here are some metrics and tools that I think could be used in computing the Cheesecake index, in addition to some of the CPAN kwalitee metrics:
- unit test coverage: how many methods/functions are exercised in the unit tests?
- docstring coverage: how many methods/functions have docstrings?
- PyFlakes/PyLint validation
- Has modules grouped into packages, all are cohesive, loosely coupled, and reasonable length
- Largely follows PEP conventions
- Avoids reinventing any wheels by using as many Python-provided modules as possible
- Well documented for users (manpages or other) and developers (docstrings), yet self-documenting with minimal inline commenting
- Uses distutils for ease of distribution
- Contains standard informational files such as: BUGS.txt COPYING.txt FAQ.txt HISTORY.txt README.txt THANKS.txt
- Contains standard directory structure such as: doc/ tools/ (or scripts/ or bin/) packageX/ packageY/ test/
- Clean UI, easy to use, probably relying on optparse or getopt
- Has many unit tests that are trivial to run, and code is structured to facilitate building of tests
- The first example of a pythonic package that comes to my mind is docutils
Any other ideas? Anybody interested in participating in such a project? Leave a comment with your email address or send me email at