Changeset 19
- Timestamp:
- 05/24/06 17:34:57 (7 years ago)
- Files:
-
- branches/mk/README (modified) (2 diffs)
- branches/mk/README.html (modified) (19 diffs)
- branches/mk/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/mk/README
r5 r19 377 377 index measurement, followed by other metrics inspired from the 378 378 `kwalitee indicators <http://cpants.dev.zsi.at/kwalitee.html>`_. 379 Please edit the `IndexMeasurementIdeas <http:// tracos.org/cheesecake/wiki/IndexMeasurementIdeas>`_379 Please edit the `IndexMeasurementIdeas <http://pycheesecake.org/wiki/IndexMeasurementIdeas>`_ 380 380 Wiki page to add things that you would like to see covered 381 381 by the Cheesecake metrics. … … 383 383 .. footer:: Generated with rst2html.py from the 384 384 `docutils <http://docutils.sourceforge.net/>`_ 385 distribution. Last modified 200 5-12-20by386 ` Grig Gheorghiu <http://agiletesting.blogspot.com>`_.385 distribution. Last modified 2006-05-25 by 386 `Michal Kwiatkowski <http://joker.linuxstuff.pl>`_. branches/mk/README.html
r5 r19 4 4 <head> 5 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6 <meta name="generator" content="Docutils 0. 3.9: http://docutils.sourceforge.net/" />6 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" /> 7 7 <title>Cheesecake: How tasty is your code?</title> 8 <link rel="stylesheet" href="default.css" type="text/css" /> 8 <style type="text/css"> 9 10 /* 11 :Author: David Goodger 12 :Contact: goodger@users.sourceforge.net 13 :Date: $Date$ 14 :Revision: $Revision$ 15 :Copyright: This stylesheet has been placed in the public domain. 16 17 Default cascading style sheet for the HTML output of Docutils. 18 19 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to 20 customize this style sheet. 21 */ 22 23 /* used to remove borders from tables and images */ 24 .borderless, table.borderless td, table.borderless th { 25 border: 0 } 26 27 table.borderless td, table.borderless th { 28 /* Override padding for "table.docutils td" with "! important". 29 The right padding separates the table cells. */ 30 padding: 0 0.5em 0 0 ! important } 31 32 .first { 33 /* Override more specific margin styles with "! important". */ 34 margin-top: 0 ! important } 35 36 .last, .with-subtitle { 37 margin-bottom: 0 ! important } 38 39 .hidden { 40 display: none } 41 42 a.toc-backref { 43 text-decoration: none ; 44 color: black } 45 46 blockquote.epigraph { 47 margin: 2em 5em ; } 48 49 dl.docutils dd { 50 margin-bottom: 0.5em } 51 52 /* Uncomment (and remove this text!) to get bold-faced definition list terms 53 dl.docutils dt { 54 font-weight: bold } 55 */ 56 57 div.abstract { 58 margin: 2em 5em } 59 60 div.abstract p.topic-title { 61 font-weight: bold ; 62 text-align: center } 63 64 div.admonition, div.attention, div.caution, div.danger, div.error, 65 div.hint, div.important, div.note, div.tip, div.warning { 66 margin: 2em ; 67 border: medium outset ; 68 padding: 1em } 69 70 div.admonition p.admonition-title, div.hint p.admonition-title, 71 div.important p.admonition-title, div.note p.admonition-title, 72 div.tip p.admonition-title { 73 font-weight: bold ; 74 font-family: sans-serif } 75 76 div.attention p.admonition-title, div.caution p.admonition-title, 77 div.danger p.admonition-title, div.error p.admonition-title, 78 div.warning p.admonition-title { 79 color: red ; 80 font-weight: bold ; 81 font-family: sans-serif } 82 83 /* Uncomment (and remove this text!) to get reduced vertical space in 84 compound paragraphs. 85 div.compound .compound-first, div.compound .compound-middle { 86 margin-bottom: 0.5em } 87 88 div.compound .compound-last, div.compound .compound-middle { 89 margin-top: 0.5em } 90 */ 91 92 div.dedication { 93 margin: 2em 5em ; 94 text-align: center ; 95 font-style: italic } 96 97 div.dedication p.topic-title { 98 font-weight: bold ; 99 font-style: normal } 100 101 div.figure { 102 margin-left: 2em ; 103 margin-right: 2em } 104 105 div.footer, div.header { 106 clear: both; 107 font-size: smaller } 108 109 div.line-block { 110 display: block ; 111 margin-top: 1em ; 112 margin-bottom: 1em } 113 114 div.line-block div.line-block { 115 margin-top: 0 ; 116 margin-bottom: 0 ; 117 margin-left: 1.5em } 118 119 div.sidebar { 120 margin-left: 1em ; 121 border: medium outset ; 122 padding: 1em ; 123 background-color: #ffffee ; 124 width: 40% ; 125 float: right ; 126 clear: right } 127 128 div.sidebar p.rubric { 129 font-family: sans-serif ; 130 font-size: medium } 131 132 div.system-messages { 133 margin: 5em } 134 135 div.system-messages h1 { 136 color: red } 137 138 div.system-message { 139 border: medium outset ; 140 padding: 1em } 141 142 div.system-message p.system-message-title { 143 color: red ; 144 font-weight: bold } 145 146 div.topic { 147 margin: 2em } 148 149 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, 150 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { 151 margin-top: 0.4em } 152 153 h1.title { 154 text-align: center } 155 156 h2.subtitle { 157 text-align: center } 158 159 hr.docutils { 160 width: 75% } 161 162 img.align-left { 163 clear: left } 164 165 img.align-right { 166 clear: right } 167 168 ol.simple, ul.simple { 169 margin-bottom: 1em } 170 171 ol.arabic { 172 list-style: decimal } 173 174 ol.loweralpha { 175 list-style: lower-alpha } 176 177 ol.upperalpha { 178 list-style: upper-alpha } 179 180 ol.lowerroman { 181 list-style: lower-roman } 182 183 ol.upperroman { 184 list-style: upper-roman } 185 186 p.attribution { 187 text-align: right ; 188 margin-left: 50% } 189 190 p.caption { 191 font-style: italic } 192 193 p.credits { 194 font-style: italic ; 195 font-size: smaller } 196 197 p.label { 198 white-space: nowrap } 199 200 p.rubric { 201 font-weight: bold ; 202 font-size: larger ; 203 color: maroon ; 204 text-align: center } 205 206 p.sidebar-title { 207 font-family: sans-serif ; 208 font-weight: bold ; 209 font-size: larger } 210 211 p.sidebar-subtitle { 212 font-family: sans-serif ; 213 font-weight: bold } 214 215 p.topic-title { 216 font-weight: bold } 217 218 pre.address { 219 margin-bottom: 0 ; 220 margin-top: 0 ; 221 font-family: serif ; 222 font-size: 100% } 223 224 pre.literal-block, pre.doctest-block { 225 margin-left: 2em ; 226 margin-right: 2em ; 227 background-color: #eeeeee } 228 229 span.classifier { 230 font-family: sans-serif ; 231 font-style: oblique } 232 233 span.classifier-delimiter { 234 font-family: sans-serif ; 235 font-weight: bold } 236 237 span.interpreted { 238 font-family: sans-serif } 239 240 span.option { 241 white-space: nowrap } 242 243 span.pre { 244 white-space: pre } 245 246 span.problematic { 247 color: red } 248 249 span.section-subtitle { 250 /* font-size relative to parent (h1..h6 element) */ 251 font-size: 80% } 252 253 table.citation { 254 border-left: solid 1px gray; 255 margin-left: 1px } 256 257 table.docinfo { 258 margin: 2em 4em } 259 260 table.docutils { 261 margin-top: 0.5em ; 262 margin-bottom: 0.5em } 263 264 table.footnote { 265 border-left: solid 1px black; 266 margin-left: 1px } 267 268 table.docutils td, table.docutils th, 269 table.docinfo td, table.docinfo th { 270 padding-left: 0.5em ; 271 padding-right: 0.5em ; 272 vertical-align: top } 273 274 table.docutils th.field-name, table.docinfo th.docinfo-name { 275 font-weight: bold ; 276 text-align: left ; 277 white-space: nowrap ; 278 padding-left: 0 } 279 280 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, 281 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { 282 font-size: 100% } 283 284 tt.docutils { 285 background-color: #eeeeee } 286 287 ul.auto-toc { 288 list-style-type: none } 289 290 </style> 9 291 </head> 10 292 <body> 11 293 <div class="document" id="cheesecake-how-tasty-is-your-code"> 12 294 <h1 class="title">Cheesecake: How tasty is your code?</h1> 13 <div class="contents topic" id="table-of-contents">14 <p class="topic-title first"><a name="table-of-contents"><strong>Table of Contents</strong></a></p>295 <div class="contents topic"> 296 <p class="topic-title first"><a id="table-of-contents" name="table-of-contents"><strong>Table of Contents</strong></a></p> 15 297 <ul class="simple"> 16 298 <li><a class="reference" href="#summary" id="id1" name="id1">Summary</a></li> … … 26 308 </ul> 27 309 </div> 28 <div class="section" id="summary">29 <h1><a class="toc-backref" href="#id1" name="summary">Summary</a></h1>30 <p>The idea of the Cheesecake project is to rank Python packages based on various 310 <div class="section"> 311 <h1><a class="toc-backref" href="#id1" id="summary" name="summary">Summary</a></h1> 312 <p>The idea of the Cheesecake project is to rank Python packages based on various 31 313 empirical "kwalitee" factors, such as:</p> 32 314 <blockquote> … … 40 322 <li>existence of certain directories such as doc, test, demo, examples</li> 41 323 <li>percentage of modules/functions/classes/methods with docstrings</li> 42 <li>percentage of functions/methods that are unit tested (not currently 324 <li>percentage of functions/methods that are unit tested (not currently 43 325 implemented)</li> 44 326 <li>average pylint score for all non-test and non-demo modules</li> 45 327 </ul> 46 328 </blockquote> 47 <p>Currently, the Cheesecake index is computed for invidual packages obtained 48 through a variety of methods (detailed below). One of the goals of the 49 Cheesecake project is to automatically compute the Cheesecake index for 50 all packages uploaded to the PyPI Cheese Shop (possibly at upload time) and 51 to maintain a collection of Web pages with statistics related to the 329 <p>Currently, the Cheesecake index is computed for invidual packages obtained 330 through a variety of methods (detailed below). One of the goals of the 331 Cheesecake project is to automatically compute the Cheesecake index for 332 all packages uploaded to the PyPI Cheese Shop (possibly at upload time) and 333 to maintain a collection of Web pages with statistics related to the 52 334 various indexes of the packages.</p> 53 335 <p>Cheesecake currently computes 3 types of indexes:</p> … … 61 343 <p>The algorithms for computing each index type are detailed below.</p> 62 344 </div> 63 <div class="section" id="why-cheesecake">64 <h1><a class="toc-backref" href="#id2" name="why-cheesecake">Why Cheesecake?</a></h1>345 <div class="section"> 346 <h1><a class="toc-backref" href="#id2" id="why-cheesecake" name="why-cheesecake">Why Cheesecake?</a></h1> 65 347 <p>The concept of "kwalitee" originated in the Perl community. Here's a relevant 66 348 quote:</p> 67 349 <blockquote> 68 350 <em>It looks like quality, it sounds like quality, but it's not quite quality.</em></blockquote> 69 <p>Kwalitee is an empiric measure of how good a specific body of code is. It 70 defines quality indicators and measures the code along them. It is currently 351 <p>Kwalitee is an empiric measure of how good a specific body of code is. It 352 defines quality indicators and measures the code along them. It is currently 71 353 used by the <a class="reference" href="http://cpants.dev.zsi.at/index.html">CPANTS Testing Service</a> 72 354 to evaluate the 'goodness' of CPAN packages.</p> 73 <p>Since the Python package repository (aka <a class="reference" href="http://www.python.org/pypi">PyPI</a>) 355 <p>Since the Python package repository (aka <a class="reference" href="http://www.python.org/pypi">PyPI</a>) 74 356 is hosted at the Cheese Shop, 75 it stands to reason that the quality indicator of a PyPI package should be 357 it stands to reason that the quality indicator of a PyPI package should be 76 358 called the Cheesecake index!</p> 77 359 </div> 78 <div class="section" id="usage-examples">79 <h1><a class="toc-backref" href="#id3" name="usage-examples">Usage examples</a></h1>80 <p>To compute the Cheesecake index for a given project, run the cheesecake.py 360 <div class="section"> 361 <h1><a class="toc-backref" href="#id3" id="usage-examples" name="usage-examples">Usage examples</a></h1> 362 <p>To compute the Cheesecake index for a given project, run the cheesecake.py 81 363 module from the command line and indicate either:</p> 82 364 <blockquote> … … 88 370 </blockquote> 89 371 <p>In all cases, the cheesecake module will attempt to download the package 90 if necessary, then to unpack it in a sandbox directory (/tmp/cheesecake_sandbox 91 by default). If either of these operations fails, the Cheesecake index for 92 the package will be 0. If the package can be successfully unpacked, the 372 if necessary, then to unpack it in a sandbox directory (/tmp/cheesecake_sandbox 373 by default). If either of these operations fails, the Cheesecake index for 374 the package will be 0. If the package can be successfully unpacked, the 93 375 cheesecake module will compute the values for a variety of indexes detailed 94 376 in the algorithm given at the end of this file.</p> 95 377 <p>If the package can be successfully downloaded and unpacked, a log file is 96 created in the sandbox directory and named <package>.log (e.g. the log file 378 created in the sandbox directory and named <package>.log (e.g. the log file 97 379 for twill-0.7.4.tar.gz is /tmp/cheesecake_sandbox/twill-0.7.4.tar.gz.log). 98 380 The log file is not automatically deleted after the Cheesecake index is … … 112 394 </pre> 113 395 </li> 114 <li><p class="first">Compute the Cheesecake index for the twill package by indicating its path 396 <li><p class="first">Compute the Cheesecake index for the twill package by indicating its path 115 397 on the local file system:</p> 116 398 <pre class="literal-block"> … … 118 400 </pre> 119 401 </li> 120 <li><p class="first">To increase the verbosity of the output, use the -v or --verbose option. 402 <li><p class="first">To increase the verbosity of the output, use the -v or --verbose option. 121 403 For more options, run cheesecake.py with -h or --help.</p> 122 404 </li> … … 124 406 </blockquote> 125 407 </div> 126 <div class="section" id="obtaining-the-source-code">127 <h1><a class="toc-backref" href="#id4" name="obtaining-the-source-code">Obtaining the source code</a></h1>408 <div class="section"> 409 <h1><a class="toc-backref" href="#id4" id="obtaining-the-source-code" name="obtaining-the-source-code">Obtaining the source code</a></h1> 128 410 <p>The Cheesecake project has not yet been released as a tarball or 129 411 a Python egg. You can obtain the source code from SourceForge via CVS:</p> … … 132 414 </pre> 133 415 </div> 134 <div class="section" id="mailing-list">135 <h1><a class="toc-backref" href="#id5" name="mailing-list">Mailing list</a></h1>416 <div class="section"> 417 <h1><a class="toc-backref" href="#id5" id="mailing-list" name="mailing-list">Mailing list</a></h1> 136 418 <p>Developer mailing list: <a class="reference" href="http://lists.sourceforge.net/lists/listinfo/cheesecake-devel">http://lists.sourceforge.net/lists/listinfo/cheesecake-devel</a></p> 137 419 </div> 138 <div class="section" id="license">139 <h1><a class="toc-backref" href="#id6" name="license">License</a></h1>140 <p>Cheesecake is licensed under the Python Software Foundation license, 420 <div class="section"> 421 <h1><a class="toc-backref" href="#id6" id="license" name="license">License</a></h1> 422 <p>Cheesecake is licensed under the Python Software Foundation license, 141 423 the same license that governs Python itself. The text of the license is 142 424 available in the <tt class="docutils literal"><span class="pre">LICENSE</span></tt> file in the source code distribution and 143 can also be downloaded from 425 can also be downloaded from 144 426 <a class="reference" href="http://www.opensource.org/licenses/PythonSoftFoundation.php">http://www.opensource.org/licenses/PythonSoftFoundation.php</a>.</p> 145 427 </div> 146 <div class="section" id="author-contact-info">147 <h1><a class="toc-backref" href="#id7" name="author-contact-info">Author contact info</a></h1>428 <div class="section"> 429 <h1><a class="toc-backref" href="#id7" id="author-contact-info" name="author-contact-info">Author contact info</a></h1> 148 430 <p>Grig Gheorghiu</p> 149 431 <p>Email: <grig at gheorghiu dot net></p> 150 432 <p>Web site: <a class="reference" href="http://agiletesting.blogspot.com">http://agiletesting.blogspot.com</a></p> 151 433 </div> 152 <div class="section" id="algorithm-for-computing-the-cheesecake-index">153 <h1><a class="toc-backref" href="#id8" name="algorithm-for-computing-the-cheesecake-index">Algorithm for computing the Cheesecake index</a></h1>434 <div class="section"> 435 <h1><a class="toc-backref" href="#id8" id="algorithm-for-computing-the-cheesecake-index" name="algorithm-for-computing-the-cheesecake-index">Algorithm for computing the Cheesecake index</a></h1> 154 436 <p>The cheesecake.py module uses the following constants:</p> 155 437 <pre class="literal-block"> … … 171 453 </pre> 172 454 <p><strong>Step 0</strong></p> 173 <p>Initialize the Cheesecake index to 0. Also initialize to 0 174 the partial Cheesecake indexes for installability, documentation 455 <p>Initialize the Cheesecake index to 0. Also initialize to 0 456 the partial Cheesecake indexes for installability, documentation 175 457 and code kwalitee.</p> 176 <p>Compute the maximum overall Cheesecake index that can be reached by 458 <p>Compute the maximum overall Cheesecake index that can be reached by 177 459 any given package, which is the sum:</p> 178 460 <pre class="literal-block"> 179 INDEX_PYPI_DOWNLOAD + 180 INDEX_UNPACK + INDEX_UNPACK_DIR + 461 INDEX_PYPI_DOWNLOAD + 462 INDEX_UNPACK + INDEX_UNPACK_DIR + 181 463 INDEX_INSTALL + 182 MAX_INDEX_DOCSTRINGS + MAX_INDEX_PYLINT + 464 MAX_INDEX_DOCSTRINGS + MAX_INDEX_PYLINT + 183 465 (INDEX_FILE * number_of_expected_files) + 184 466 (INDEX_FILE_CRITICAL * number_of_expected_critical_files) + … … 188 470 <p>Compute the maximum Cheesecake index for installability, which is the sum:</p> 189 471 <pre class="literal-block"> 190 INDEX_PYPI_DOWNLOAD + 191 INDEX_UNPACK + INDEX_UNPACK_DIR + 472 INDEX_PYPI_DOWNLOAD + 473 INDEX_UNPACK + INDEX_UNPACK_DIR + 192 474 INDEX_INSTALL 193 475 </pre> … … 205 487 </pre> 206 488 <p><strong>Step 1a</strong></p> 207 <p>If short name of the package was specified with <tt class="docutils literal"><span class="pre">-n</span></tt> or <tt class="docutils literal"><span class="pre">--name</span></tt>, 208 try to download the package from the PyPI index page by following the links to 209 the package home page and the package download URL (this is accomplished 489 <p>If short name of the package was specified with <tt class="docutils literal"><span class="pre">-n</span></tt> or <tt class="docutils literal"><span class="pre">--name</span></tt>, 490 try to download the package from the PyPI index page by following the links to 491 the package home page and the package download URL (this is accomplished 210 492 using setuptools utilities).</p> 211 <p>If not successful, exit with a Cheesecake index of 0. If successful and 212 package was found at the Cheese Shop, add <tt class="docutils literal"><span class="pre">INDEX_PYPI_DOWNLOAD</span></tt> to 493 <p>If not successful, exit with a Cheesecake index of 0. If successful and 494 package was found at the Cheese Shop, add <tt class="docutils literal"><span class="pre">INDEX_PYPI_DOWNLOAD</span></tt> to 213 495 the overall Cheesecake index and to the installability Cheesecake index.</p> 214 <p>If successful but package was not found at the Cheese Shop, add 496 <p>If successful but package was not found at the Cheese Shop, add 215 497 <tt class="docutils literal"><span class="pre">INDEX_PYPI_DOWNLOAD</span> <span class="pre">-</span> <span class="pre">(INDEX_PYPI_DISTANCE</span> <span class="pre">*</span> <span class="pre">number_of_links_to_package)</span></tt> 216 498 to the overall Cheesecake index and to the installability Cheesecake index.</p> 217 499 <p><strong>Step 1b</strong></p> 218 <p>If full URL of the package was specified with <tt class="docutils literal"><span class="pre">-u</span></tt> or <tt class="docutils literal"><span class="pre">--url</span></tt>, 500 <p>If full URL of the package was specified with <tt class="docutils literal"><span class="pre">-u</span></tt> or <tt class="docutils literal"><span class="pre">--url</span></tt>, 219 501 try to download the package from the specified URL.</p> 220 <p>If not successful, exit with a Cheesecake index of 0. If successful, 221 add <tt class="docutils literal"><span class="pre">INDEX_URL_DOWNLOAD</span></tt> to the overall Cheesecake index and to 502 <p>If not successful, exit with a Cheesecake index of 0. If successful, 503 add <tt class="docutils literal"><span class="pre">INDEX_URL_DOWNLOAD</span></tt> to the overall Cheesecake index and to 222 504 the installability Cheesecake index.</p> 223 505 <p><strong>Step 1c</strong></p> … … 225 507 <tt class="docutils literal"><span class="pre">--path</span></tt>, copy the package to the sandbox directory.</p> 226 508 <p><strong>Step 2</strong></p> 227 <p>Unpack the package (currently supported archive types are zip and 509 <p>Unpack the package (currently supported archive types are zip and 228 510 tar.gz/tgz; in the near future we will support Python Eggs.)</p> 229 <p>If not successful, exit with a Cheesecake index of 0. If successful, add 230 <tt class="docutils literal"><span class="pre">INDEX_UNPACK</span></tt> to the overall Cheesecake index and to the installability 511 <p>If not successful, exit with a Cheesecake index of 0. If successful, add 512 <tt class="docutils literal"><span class="pre">INDEX_UNPACK</span></tt> to the overall Cheesecake index and to the installability 231 513 Cheesecake index.</p> 232 514 <p><strong>Step 3</strong></p> 233 515 <p>Check that the unpack directory has the same name as the package name 234 (i.e. when unpacking twill-0.7.4.tar.gz, we expect the unpack directory 516 (i.e. when unpacking twill-0.7.4.tar.gz, we expect the unpack directory 235 517 to be twill-0.7.4.)</p> 236 <p>If the unpack directory name is the same as the package name, add 518 <p>If the unpack directory name is the same as the package name, add 237 519 <tt class="docutils literal"><span class="pre">INDEX_UNPACK_DIR</span></tt> 238 520 to the overall Cheesecake index and to the installability Cheesecake index.</p> 239 521 <p><strong>Step 4</strong></p> 240 <p>Install the package to a temporary directory in a non-default location. 522 <p>Install the package to a temporary directory in a non-default location. 241 523 If successful, add <tt class="docutils literal"><span class="pre">INDEX_INSTALL</span></tt> to the overall Cheesecake index and to the 242 524 installability Cheesecake index.</p> 243 525 <p><strong>Step 5</strong></p> 244 <p>Check for existence of specific files. 245 For each file found, add <tt class="docutils literal"><span class="pre">INDEX_FILE</span></tt> to the overall 246 Cheesecake index and to the documentation Cheesecake index. 526 <p>Check for existence of specific files. 527 For each file found, add <tt class="docutils literal"><span class="pre">INDEX_FILE</span></tt> to the overall 528 Cheesecake index and to the documentation Cheesecake index. 247 529 If the file is deemed critical, add <tt class="docutils literal"><span class="pre">INDEX_FILE_CRITICAL</span></tt> instead.</p> 248 530 <p>The following special files ("cheese_files") are currently checked:</p> … … 264 546 </pre> 265 547 <p><strong>Step 6</strong></p> 266 <p>Check for existence of specific directories. 267 For each directory found, add <tt class="docutils literal"><span class="pre">INDEX_DIR</span></tt> to the overall Cheesecake 268 index and to the documentation Cheesecake index. 548 <p>Check for existence of specific directories. 549 For each directory found, add <tt class="docutils literal"><span class="pre">INDEX_DIR</span></tt> to the overall Cheesecake 550 index and to the documentation Cheesecake index. 269 551 If the directory is deemed critical, add <tt class="docutils literal"><span class="pre">INDEX_DIR_CRITICAL</span></tt> instead. 270 552 If the directory is found empty, add <tt class="docutils literal"><span class="pre">INDEX_DIR_EMPTY</span></tt> instead.</p> … … 277 559 critical_cheese_dirs = ["doc", "test"] 278 560 </pre> 279 <p>To check if a directory DIR is among the cheese directories, 561 <p>To check if a directory DIR is among the cheese directories, 280 562 the following regular expression is used:</p> 281 563 <pre class="literal-block"> … … 283 565 </pre> 284 566 <p><strong>Step 7</strong></p> 285 <p>Check for existence of .pyc files. If found, decrease the score 286 by subtracting <tt class="docutils literal"><span class="pre">INDEX_FILE_PYC</span></tt> from the overall Cheesecake index 567 <p>Check for existence of .pyc files. If found, decrease the score 568 by subtracting <tt class="docutils literal"><span class="pre">INDEX_FILE_PYC</span></tt> from the overall Cheesecake index 287 569 and from the documentation Cheesecake index.</p> 288 570 <p><strong>Step 8</strong></p> 289 <p>Compute the percentage of modules/classes/methods/functions that have 290 docstrings associated with them. Only Python modules that are not in test, 291 doc, demo and example directories are checked. 571 <p>Compute the percentage of modules/classes/methods/functions that have 572 docstrings associated with them. Only Python modules that are not in test, 573 doc, demo and example directories are checked. 292 574 Round up the percentage and add it to the overall Cheesecake index and to the 293 575 documentation Cheesecake index.</p> 294 576 <p><strong>Step 9</strong></p> 295 <p>If pylint is present on the system, run pylint against all Python files 296 that are not in the test, docs or demo directories. 297 Average the non-negative pylint scores, multiply the average by 10 and 298 add it to the overall Cheesecake index and to the code kwalitee 577 <p>If pylint is present on the system, run pylint against all Python files 578 that are not in the test, docs or demo directories. 579 Average the non-negative pylint scores, multiply the average by 10 and 580 add it to the overall Cheesecake index and to the code kwalitee 299 581 Cheesecake index.</p> 300 582 <p><strong>Step 10</strong></p> 301 <p>For each of the partial Cheesecake index types (installability, 302 documentation and code kwalitee), display the absolute Cheesecake 303 index for that type as the sum of all indexes of that type computed in 304 the previous steps. 583 <p>For each of the partial Cheesecake index types (installability, 584 documentation and code kwalitee), display the absolute Cheesecake 585 index for that type as the sum of all indexes of that type computed in 586 the previous steps. 305 587 Also display the relative Cheesecake index for that type as the percentage 306 588 of <tt class="docutils literal"><span class="pre">(absolute_index</span> <span class="pre">/</span> <span class="pre">maximum_index)</span></tt>.</p> … … 309 591 index for the package as the percentage of <tt class="docutils literal"><span class="pre">(absolute_index</span> <span class="pre">/</span> <span class="pre">maximum_index)</span></tt>.</p> 310 592 </div> 311 <div class="section" id="sample-output">312 <h1><a class="toc-backref" href="#id9" name="sample-output">Sample output</a></h1>593 <div class="section"> 594 <h1><a class="toc-backref" href="#id9" id="sample-output" name="sample-output">Sample output</a></h1> 313 595 <pre class="literal-block"> 314 596 $ python cheesecake.py -n Durus … … 360 642 </pre> 361 643 </div> 362 <div class="section" id="future-plans">363 <h1><a class="toc-backref" href="#id10" name="future-plans">Future plans</a></h1>364 <p>Cheesecake is under very active development. The immediate goal is to add the unit test 365 index measurement, followed by other metrics inspired from the 366 <a class="reference" href="http://cpants.dev.zsi.at/kwalitee.html">kwalitee indicators</a>. 367 Please edit the <a class="reference" href="http:// tracos.org/cheesecake/wiki/IndexMeasurementIdeas">IndexMeasurementIdeas</a>368 Wiki page to add things that you would like to see covered 644 <div class="section"> 645 <h1><a class="toc-backref" href="#id10" id="future-plans" name="future-plans">Future plans</a></h1> 646 <p>Cheesecake is under very active development. The immediate goal is to add the unit test 647 index measurement, followed by other metrics inspired from the 648 <a class="reference" href="http://cpants.dev.zsi.at/kwalitee.html">kwalitee indicators</a>. 649 Please edit the <a class="reference" href="http://pycheesecake.org/wiki/IndexMeasurementIdeas">IndexMeasurementIdeas</a> 650 Wiki page to add things that you would like to see covered 369 651 by the Cheesecake metrics.</p> 370 652 </div> … … 372 654 <div class="footer"> 373 655 <hr class="footer" /> 374 Generated with rst2html.py from the 375 <a class="reference" href="http://docutils.sourceforge.net/">docutils</a> 376 distribution. Last modified 200 5-12-20 by377 <a class="reference" href="http:// agiletesting.blogspot.com">Grig Gheorghiu</a>.656 Generated with rst2html.py from the 657 <a class="reference" href="http://docutils.sourceforge.net/">docutils</a> 658 distribution. Last modified 2006-05-25 by 659 <a class="reference" href="http://joker.linuxstuff.pl">Michal Kwiatkowski</a>. 378 660 </div> 379 661 </body> branches/mk/setup.py
r5 r19 16 16 license = "PSF", 17 17 keywords = "cheesecake quality index kwalitee cheeseshop pypi", 18 url = "http:// tracos.org/cheesecake",18 url = "http://pycheesecake.org/", 19 19 20 20 packages = ['cheesecake',
