[cheesecake-users] Comments on the index

Grig Gheorghiu grig.gheorghiu at gmail.com
Wed Jun 21 06:54:49 PDT 2006


Hi, Noel

On 6/21/06, Noel O'Boyle <no228 at cam.ac.uk> wrote:
>
> Hello all,
>
> Thanks Grig and Michal, first of all, for providing guidelines on good
> kwalitee. People who know it all already are going to complain, because
> they don't want to be told how they should do X or Y. However,
> non-experts desperately need something like this.


Thanks for the kind words, we always appreciate the encouragement :-)


I asked a question about this on comp.lang.python almost a year ago, and
> didn't get any definitive answer, which made it difficult to decide what
> to do:
>
> http://groups.google.com/group/comp.lang.python/browse_frm/thread/a72040485ced988/0959cca18770abed?qºoilleach&rnum=1#0959cca18770abed
>
> In any case, thanks again for being Benevolent Dictators of Style. We
> need this.


That's exactly why we thought it would be a good idea to extract a standard
way of organizing your project, by looking at what other successful Python
projects do. Of course, we've been called names for that, but we do believe
it's worth doing it, and your messages confirms it :-)

Although calculating and recalculating the cheeseshop index has helped

> me to design my package in a more standard way, I want to mention two
> things that I think you should consider:
> (1) I have been running pylint and fixing as many problems as possible
> for each file in my program, so that my pylint score keeps increasing.
> However, when I calculate the cheeseshop index, sometimes I see drops
> and sometimes things just stay the same. The relevant lines are those
> relating to the pylint scores for different revisions of my code:
> index_pylint ............................  28 (average score is 2.76 out
> of 10)
> index_pylint ............................  33 (average score is 3.21 out
> of 10)
> index_pylint ............................  33 (average score is 3.21 out
> of 10)
> index_pylint ............................  48 (average score is 4.71 out
> of 10)
> index_pylint ............................  45 (average score is 4.48 out
> of 10)
> index_pylint ............................  61 (average score is 6.10 out
> of 10)
> index_pylint ............................  60 (average score is 5.91 out
> of 10)
>
> The problem is that index_pylint is the average of the non-negative
> pylint scores. As a result, when I increase the quality of a
> negatively-scored code to bring it above zero (which *must* be an
> improvement) the index_pylint can potentially decrease. In the worst
> case, this encourages me to decrease the quality of all of my code to
> below zero, except for one shining example of perfect code.
>
> Perhaps a better measure would be the take the average over all of the
> files of max(0,pylint_score). This would encourage improvement in
> negatively-scored files.


You're absolutely right, we need to improve the way we aggregate pylint
score.  We'll look at incorporating your suggestion.

(2) I know that you don't make pylint, you just use it. However, you
> should be aware for it seems to discourage doctests...not a good thing,
> I think. Typically, modules that include doctests have a main section as
> follows:
> if __name__ = "__main__":
>     import doctest, thismodule
>     doctest.testmod(thismodule)
>
> pylint doesn't like modules to import themselves, but how else can you
> doctest?? Or can you suggest a different convention?



We were also thinking about using only some of the checks from pylint,
instead of running pylint wholesale. Again, the issue you raise is very
valid, and we'll need to find a solution for it. So stay tuned :-)

Thanks a lot for all your feedback and suggestions.

Grig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists2.idyll.org/pipermail/cheesecake-users/attachments/20060621/d91fc59c/attachment.htm 


More information about the cheesecake-users mailing list