[cheesecake-dev] Negative scores?
Grig Gheorghiu
grig.gheorghiu at gmail.com
Sat Feb 3 15:53:10 PST 2007
On 2/3/07, Michał Kwiatkowski <constant.beta at gmail.com> wrote:
> 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?
>
I think the second solution is much better. I'm CC-ing Johann, the
author of pep8.py, because he was saying at some point that he might
introduce a scoring method in pep8.py itself. That would make things
even easier for consumers of pep8.py such as Cheesecake. But in the
mean time, I think your second solution is really good, Michal.
Grig
More information about the cheesecake-dev
mailing list