[cheesecake-dev] Negative scores?

Michał Kwiatkowski constant.beta at gmail.com
Sat Feb 3 15:23:52 PST 2007


Hi,

I need advice on Cheesecake index scoring. With introduction of pep8
we run into real possibility of packages having negative scores. I
wonder if this is a good thing.

For example, let's take a WB package in version 4.16. Its code
kwalitee index looks like this:

unit_tested ............................   0  (doesn't have unit tests)
pep8 ................................... -25  (pep8.py check: 11 error
types, 3 warning types)
---------------------------------------------
CODE KWALITEE INDEX (ABSOLUTE) ......... -25
CODE KWALITEE INDEX (RELATIVE) ......... -83  (-25 out of a maximum of
30 points is -83%)

-25 points and -83% is helpful and understandable but very intrusive
for the overall score. A package with good installabilty and
documentation still can have bad overall score because of low pep8
conformance.

I see two possible solutions to this problem. We could flatten
negative scores to zero (making zero the lowest possible value), but
it has a bad characteristic of masking progress. We want Cheesecake
score to represent overall state of a package and it should raise as
more effort is made to make package better.

Second solution is to make pep8 compatibility score always greater
than zero, with the highest score for packages with 0 errors and 0
warnings. This could be achieved by counting all possible errors and
warnings of pep8 module and calculating a maximum value from that.
This would remove negative scores while still representing changes in
scores.

What do you think?

Cheers,
mk



More information about the cheesecake-dev mailing list