Currently, the Cheesecake index is computed for invidual packages obtained
through a variety of methods (detailed below). One of the goals of the
Cheesecake project is to automatically compute the Cheesecake index for
all packages uploaded to the PyPI Cheese Shop (possibly at upload time) and
to maintain a collection of Web pages with statistics related to the
various indexes of the packages.

The concept of "kwalitee" originated in the Perl community. Here's a relevant
quote:

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.

Since the Python package repository (aka PyPI)
is hosted at the Cheese Shop,
it stands to reason that the quality indicator of a PyPI package should be
called the Cheesecake index!

In all cases, the cheesecake script will attempt to download the package
if necessary, then to unpack it in a sandbox directory (/tmp/cheesecake_sandbox
by default). If either of these operations fails, the Cheesecake index for
the package will be 0. If the package can be successfully unpacked, the
cheesecake script will compute the values for a variety of indexes detailed
in the algorithm given at the end of this file.

If the package can be successfully downloaded and unpacked, a log file is
created in the system /tmp directory and named <package>.log (e.g. the log file
for twill-0.7.4.tar.gz is /tmp/twill-0.7.4.tar.gz.log).
The log file is automatically deleted after the Cheesecake index is
computed, except for situations when errors have occured.

Command-line examples:

Compute the Cheesecake index for the Durus package by using setuptools
utilities to download the package from PyPI:

python cheesecake_index --name=Durus

Compute the Cheesecake index for the Durus package by indicating its URL:

The most recent code documentation should be always available
at http://agilistas.org/cheesecake/mk/docs/. You can also generate
this documentation directly from the Cheesecake sources. Run this command
from the main source directory:

Cheesecake is licensed under the Python Software Foundation license,
the same license that governs Python itself. The text of the license is
available in the LICENSE file in the source code distribution and
can also be downloaded from
http://www.opensource.org/licenses/PythonSoftFoundation.php.

The overall Cheesecake score is the sum of values of 3 main indexes
(installability, documentation and code kwalitee). The values of these
indexes rely on values of their subindexes and so on. The whole index tree
and corresponding values for each leaf are presented below:

Installability

package is listed on and can be downloaded from PyPI: 50

package can be downloaded from given URL: 25

package can be unpacked without problems: 25

unpacked package directory is the same as package name: 15

package has setup.py: 25

package can be installed to given directory via "setup.py install": 50

The final score depends on how well the package scores for all indexes
listed above. The score is presented in absolute range (number of points)
and relative (percent of points obtained compared to maximum possible points).

[1]

(1, 2, 3, 4, 5) It is enough for a package to contain only one of listed files.

Number of points is proportional to percent of documentable objects
(module, class or function) that have docstrings. For example, if
you have 50 documentable objects and 32 of them have docstrings
your code will get 64 points (because 64% of objects are documented).

Number of points depends on number of docstrings that are found
to contain one of known markup. Currently ReST, epytext and javadoc are
recognized. We give 10 points for 25% of formatted docstrings, 20 points
for 50% and 30 points for 75%.

Cheesecake is under very active development. The immediate goal is to add the unit test
index measurement, followed by other metrics inspired from the
kwalitee indicators.
Please edit the IndexMeasurementIdeas
Wiki page to add things that you would like to see covered
by the Cheesecake metrics.