tag:blogger.com,1999:blog-9238405.post112922639791525196..comments2026-04-17T02:13:19.234-07:00Comments on Agile Testing: Cheesecake: how tasty is your code?Grig Gheorghiuhttp://www.blogger.com/profile/17863511617654196370noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-9238405.post-1129248687010562362005-10-13T17:11:00.000-07:002005-10-13T17:11:00.000-07:00another excellent thing that could be ripped off f...another excellent thing that could be ripped off from the perl world is a built-in test target for distutils. I am constantly shocked that there is is python setup.py test that does anything helpful. :(Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-9238405.post-1129238646404950332005-10-13T14:24:00.000-07:002005-10-13T14:24:00.000-07:00Micah Elliott adds in an email:Grig, I think you'r...Micah Elliott adds in an email:<BR/><BR/>Grig, I think you're onto something here; good idea. I have no<BR/>experience with CPANTS, and I'm not sure how many of my ideals could be<BR/>checked programmatically. But if your Cheesecake tool comes into<BR/>fruition, here are some things that I would personally find useful:<BR/><BR/>* A command-line version that I could easily run on my projects.<BR/><BR/>* An output that gives more than just an index/score; maybe a bunch of<BR/> stats/indicators like pylint. I.e., it would be say "pypkglint" or<BR/> "pydistchecker", a higher level lint that operates on packages <BR/>instead<BR/> of just source files.<BR/><BR/>* Some checks that might be useful<BR/><BR/> - Module and package naming conventions. (PEP-8 describes<BR/> module-naming, but I see this broken more often than followed in<BR/> practice. And it is silent on package names, but the tutorial <BR/>uses<BR/> capitalized names.) Some consistency here would be nice.<BR/><BR/> - Existence of standard files. ESR goes into detail on this in his<BR/> "Art of UNIX Programming" book (pp 452).<BR/><BR/> - Existence of standard directories (those I mentioned before).<BR/><BR/> - Output of checkee "--help" should satisfy some standards. I <BR/>presently<BR/> check my own tools by running "help2man" which forces me to setup<BR/> optparse to follow a strict format. I have some active RFEs on<BR/> optik (optparse) to address this.<BR/><BR/> - Use of distutils. Maybe just a check for setup.py ?<BR/><BR/> - Consistency of module length. Not sure about this one, but you<BR/> might lower the score if some package modules are 10 lines while<BR/> others are 10KLOC.<BR/><BR/> - Number of modules per package. Maybe 4..20 is a good amount?<BR/><BR/> - Extra points for existence of something like "api.html", which<BR/> indicates that epydoc/pydoc generated API info.<BR/><BR/> - Extra points for .svn/CVS/RCS directories indicating that version<BR/> control is in place. Maybe even glarking of version numbers where<BR/> high numbers indicate that code is checked in frequently.<BR/><BR/> - Use of ReST in documentation, or even in docstrings.<BR/><BR/> - Count of unit tests. Do module names map to test_modulename in<BR/> test directory? How many testXXX functions exist?<BR/><BR/> - A summary calculation of pylint/pychecker scores for each module.<BR/><BR/> - Point deduction (or fail!) if any .doc/.xls, etc. files included <BR/>in<BR/> distribution.<BR/><BR/> - Extra points for use of modules that indicate extra usability was<BR/> incorporated, such as: gettext (multi-language), optparse (clean<BR/> UI), configparser (fine control), etc.<BR/><BR/>* A PEP describing the conventions (though some will argue that PEPs<BR/> should be enforcable by the compiler, so maybe just a "Cheesecake<BR/> Convention" document).<BR/><BR/>* And of course anything that CPANTS offers :-)<BR/><BR/>I'm sure people here have more ideas for quality indicators...Grig Gheorghiuhttps://www.blogger.com/profile/17863511617654196370noreply@blogger.comtag:blogger.com,1999:blog-9238405.post-1129234280376810442005-10-13T13:11:00.000-07:002005-10-13T13:11:00.000-07:00this indeed would be fun :)..It would as well be i...this indeed would be fun :)<BR/><BR/>..It would as well be interesting to add a subjective score on various subjects that a user of the package can add.<BR/><BR/>I would be interested in both such a software (especially if it would be configurable to other styles) and working on the task...Anonymoushttps://www.blogger.com/profile/04281590737890681291noreply@blogger.com