| 1 | | == Tell us what you think == |
|---|
| 2 | | |
|---|
| 3 | | See CommentsPage to read and post new comments about the project. |
|---|
| 4 | | |
|---|
| 5 | | |
|---|
| 6 | | == Timeline of SoC 2006 == |
|---|
| 7 | | |
|---|
| 8 | | === Development of Cheesecake === |
|---|
| 9 | | ''First level of list is a story, second level is a task. We allocate 2 story points per day.'' |
|---|
| 10 | | |
|---|
| 11 | | Stories selected for [http://pycheesecake.org/milestone/gruyere gruyere] milestone: |
|---|
| 12 | | |
|---|
| 13 | | ---- |
|---|
| 14 | | |
|---|
| 15 | | * Implement enabling/disabling indices from the command line. |
|---|
| 16 | | Options that should be supported: |
|---|
| 17 | | * --enable=Index,Index,.. |
|---|
| 18 | | * --disable-all |
|---|
| 19 | | * --disable=Index,Index,.. |
|---|
| 20 | | |
|---|
| 21 | | * Add support to bz2 archives by standard [http://docs.python.org/lib/module-bz2.html bz2 module] '''(1 point)''' |
|---|
| 22 | | |
|---|
| 23 | | * Write a test that will incorporate pylint checks '''(2 points)''' |
|---|
| 24 | | * There are certain warnings and errors that we don't want to see in Cheesecake, like importing warning W0611, W0404, or some style errors. This story will include: |
|---|
| 25 | | * Choose which pylint warnings and errors are feasible for Cheesecake. |
|---|
| 26 | | * Write test that calls pylint and interpret its output as either '''pass''' or '''fail''' result. |
|---|
| 27 | | * Fix all Cheesecake code that causes pylint test to fail. |
|---|
| 28 | | |
|---|
| 29 | | * Write new configuration files for Cheesecake. |
|---|
| 30 | | * Look at [http://www.voidspace.org.uk/python/configobj.html ConfigObj]. |
|---|
| 31 | | |
|---|
| 32 | | * Improve existing cheesecake scores on all dimensions (documentation, installability, code kwalitee) |
|---|
| 33 | | * Starting points: IndexMeasurementIdeas, [http://agiletesting.blogspot.com/2005/12/whiff-of-cheesecake.html A whiff of Cheesecake] |
|---|
| 34 | | * Check [http://www.logilab.org/projects/pylint/documentation/features PyLint features] to avoid duplication of work. |
|---|
| 35 | | * Code quality |
|---|
| 36 | | * Make sure that modules inside package follow the [http://www.python.org/dev/peps/pep-0008/ PEP-8] naming conventions: ''Modules should have short, lowercase names, without underscores.''. Having a package name that follows this convention should give the application a bonus points. |
|---|
| 37 | | * Extra points for use of modules that indicate extra usability was incorporated, such as: gettext (multi-language), optparse (clean UI), configparser (fine control), etc. --Micah Elliott |
|---|
| 38 | | * Consider use of pyflakes and pychecker (first has very small set of checks, and second need code execution; both have functionality partially overlapping pylint features). |
|---|
| 39 | | * Write code (either pylint plugin or separate script) that will check consistency of project coding style. |
|---|
| 40 | | * Installability |
|---|
| 41 | | * Check that .svn, CVS directories are *not* present in the package, as they're not important for the user. |
|---|
| 42 | | * See how Cheesecake handles packages that have both eggs and tar.gz |
|---|
| 43 | | * Make sure that packages can be installed both in the default location (but then you need to run cheesecake_index as root) and in an alternate location. |
|---|
| 44 | | * Documentation |
|---|
| 45 | | * Do not penalize one-file packages that have inline documentation and tests. Substract points only for lack of setup.py. |
|---|
| 46 | | |
|---|
| 47 | | * Test coverage (code kwalitee section) |
|---|
| 48 | | * Incorporation of nose (as it already has quite good test discovering heuristics) |
|---|
| 49 | | * Dynamic (code coverage) -- need to run unit tests in chroot jail or VM |
|---|
| 50 | | * which lines of code in overall has been executed during tests (inspired by [http://eigenclass.org//hiki.rb?rcov rcov]) - check out [http://www.nedbatchelder.com/code/modules/coverage.html coverage.py] |
|---|
| 51 | | * tests results |
|---|
| 52 | | * adhering to standards |
|---|
| 53 | | * setup.py test target |
|---|
| 54 | | * use of Python standard library testing modules (doctest, unittest) |
|---|
| 55 | | |
|---|
| 56 | | * Make Cheesecake itself score as close to 100% as possible. |
|---|
| 57 | | |
|---|
| 58 | | * Add configuration file that allows package creators to specify which directories/files to exclude from scoring (for example 3rd party modules/packages) |
|---|
| 59 | | * maybe by special setup.py hook? |
|---|
| 60 | | |
|---|
| 61 | | * Collaborate with community (esp. catalog-sig, distutils-sig) on putting together lists of files/directories that are expected to be in a package (for installability and documentation categories) |
|---|
| 62 | | |
|---|
| 63 | | * Release a first version of Cheesecake |
|---|
| 64 | | * Either as tar.gz source and .egg package. |
|---|
| 65 | | * Don't do this too early. Make sure it is good enough and scores high cheesecake index. ;-) |
|---|
| 66 | | |
|---|
| 67 | | === Cheeseshop/PyPI integration === |
|---|
| 68 | | * Deploy PyPI code on our own server for sandbox/testing purposes |
|---|
| 69 | | * Compute cheesecake scores for a package when it's uploaded to PyPI |
|---|
| 70 | | * Build a database of packages relations (which package requires which) |
|---|
| 71 | | * Figure out reliably a package name given its archive/egg name (use setuptools functionality which already does this) |
|---|
| 72 | | * Save scores in database, build Web application front end for reports on various criteria and for uploading a package and computing its scores |
|---|
| 73 | | * Richard Jones proposed having the scores visible only to package creators; Grig proposed showing the top 3 or 5 packages for each category (installability, documentation, code kwalitee) as a 'hall of fame' as opposed to a 'hall of shame' |
|---|
| 74 | | * Investigate dynamically starting a Xen virtual machine for each package and computing more dynamic scores that involve the execution of the package code |
|---|
| 75 | | * Statistics frontend and integration with current PyPI interface |
|---|
| 76 | | * Documentation for cheesecake scores. '''What''' does it count, '''why''' it's worth to improve it and '''how''' to do it. |
|---|
| 77 | | * It will also include description of situations when Cheesecake doesn't work. |
|---|
| 78 | | * Place links to it right after Cheesecake scores for given package. |
|---|
| 79 | | |
|---|
| 80 | | |
|---|
| 81 | | === Hello world package === |
|---|
| 82 | | Simple 'Hello world' package scoring 100% to be an example of good practices. Something like [http://savannah.gnu.org/projects/hello/ hello] for GNU. |
|---|
| 83 | | |
|---|
| 84 | | ---- |
|---|
| 85 | | |
|---|
| 86 | | == Completed stories == |
|---|
| 87 | | |
|---|
| 88 | | '''First iteration ([http://pycheesecake.org/milestone/brie brie])''' |
|---|
| 89 | | |
|---|
| 90 | | * Bugfixes. '''(2 points)''' |
|---|
| 91 | | * Score is decresed for .pyc files, the same should be done for .pyo. |
|---|
| 92 | | * Filenames checking should be a bit more restrictive than checking regular expression. Readme, README and readme are acceptable names, but !ReAdMe is not. |
|---|
| 93 | | * Files that change cheesecake index cannot be empty (currenty we're only testing for existence). |
|---|
| 94 | | |
|---|
| 95 | | * Look into [http://pycheesecake.org/browser/trunk/cheesecake/cheesecake_index.py#L762 docstring index]. '''(6 points)''' |
|---|
| 96 | | * Use the latest [http://codespeak.net/svn/user/mwh/pydoctor/ pydoctor]. |
|---|
| 97 | | * Check docstrings contents: make sure they're not empty. |
|---|
| 98 | | * Check docstrings for use of [http://epydoc.sourceforge.net/epytextintro.html epytext]. |
|---|
| 99 | | * Check docstrings for use of ReST. |
|---|
| 100 | | * Check docstrings for use of Javadoc. |
|---|
| 101 | | * Write finer-grained unit tests for docstring index. |
|---|
| 102 | | * Find out what is better for doctest tests discovery: pydoctor or doctest itself. |
|---|
| 103 | | |
|---|
| 104 | | '''Second iteration ([http://pycheesecake.org/milestone/camembert camembert])''' |
|---|
| 105 | | |
|---|
| 106 | | * Refactor and improve current code that computes index. '''(4 points)''' |
|---|
| 107 | | * `compute_cheesecake_index` calls `process_partial_index` which in turns calls `process_index` for each index in given collection. Methods that compute indices should be moved from Cheesecake class into Index class. Each index should also be alllowed to have children, so we can group indices easily. This change will make function that compute index easier to read and write. It will also ease enabling/disabling certain plugins (now it involves changes in several different places in the code). |
|---|
| 108 | | * Move scores and computing methods to Index class. |
|---|
| 109 | | * Create simple interface for binding few indices together |
|---|
| 110 | | * `add_child` method |
|---|
| 111 | | * default `compute_index` method that computes all children indices and returns their sum |
|---|
| 112 | | * `max_index` attribute that is automatically used during computation of maximum score |
|---|
| 113 | | * Incorporate new cheese files interface into scores that score files: |
|---|
| 114 | | {{{ |
|---|
| 115 | | cheese_files = { |
|---|
| 116 | | # 15 points if package has readme file |
|---|
| 117 | | 'readme': 15, |
|---|
| 118 | | # 10 points if package has one (or more) file from given set |
|---|
| 119 | | ('announce', 'thanks'): 10, |
|---|
| 120 | | # give 20 points to packages that contain 2 files from given set |
|---|
| 121 | | Subset('install', 'setup.py', 'copying', min=2): 20, |
|---|
| 122 | | } |
|---|
| 123 | | }}} |
|---|
| 124 | | * Implement some name generators to get rid of `(.txt)*` magic, e.g.: |
|---|
| 125 | | {{{ |
|---|
| 126 | | cheese_files = { |
|---|
| 127 | | # will accept readme, as well as readme.html and readme.txt |
|---|
| 128 | | WithOptionalExt('readme', ['html', 'txt']): 15 |
|---|
| 129 | | } |
|---|
| 130 | | }}} |
|---|
| 131 | | * How many such groups we'll have is another story. High/medium/low importance groups are OK. Need to figure out which files/directories should be in which category, via community discussion. |
|---|
| 132 | | * Make scores based on percents better: currently each (docstrings, unittests, pylint) takes 100 points, which isn't perfect. The idea is to reduce scores differences between Cheesecake versions. |
|---|
| 133 | | |
|---|
| 134 | | * Extend buildbot setup, so it will be able to: '''(4 points)''' |
|---|
| 135 | | * generate up-to date documentation directly from the Subversion with use of epydoc tool |
|---|
| 136 | | * generate code coverage statistics with use of coverage tool |
|---|
| 137 | | * write script for converting ReST document into Trac Wiki format |
|---|
| 138 | | |
|---|
| 139 | | '''Third iteration ([http://pycheesecake.org/milestone/devon devon])''' |
|---|
| 140 | | |
|---|
| 141 | | * Create functional tests that actually execute ''cheesecake_index'' script. Check that Cheesecake is: '''(4 points)''' |
|---|
| 142 | | * properly cleaning up |
|---|
| 143 | | * leaving log file when package is broken and is removing it otherwise |
|---|
| 144 | | * computing score properly |
|---|
| 145 | | * handling its command line options properly |
|---|
| 146 | | |
|---|
| 147 | | * Write script (using twill) that will automatically download and score all packages from PyPI. '''(3 points)''' |
|---|
| 148 | | * Each package should have its score and complete Cheesecake output logged. |
|---|
| 149 | | * Gather time statistics for each package. |
|---|
| 150 | | * Make a summary after scoring all packages: |
|---|
| 151 | | * number of packages for which Cheesecake raised an exception |
|---|
| 152 | | * manually check first/last 10 packages and think about improving scoring techniques |
|---|
| 153 | | |
|---|
| 154 | | * Add support for egg packages. '''(3 points)''' |
|---|
| 155 | | * Refactor supported packages interface inside [http://pycheesecake.org/browser/trunk/cheesecake/cheesecake_index.py#L138 Cheesecake class], so that [http://pycheesecake.org/browser/trunk/cheesecake/cheesecake_index.py#L138 package_types] actually means something. |
|---|
| 156 | | * Add support to eggs by setuptools interface. |
|---|
| 157 | | |
|---|
| 158 | | '''Fourth iteration ([http://pycheesecake.org/milestone/emmental emmental])''' |
|---|
| 159 | | |
|---|
| 160 | | * Implement --static command line flag, which makes Cheesecake do only static tests, that don't execute any of package code. '''(2 points)''' |
|---|
| 161 | | * Make execution of some parts of code depending on "static" flag. |
|---|
| 162 | | * Implement static "profile" - a subset of all indices that scores only statically. |
|---|
| 163 | | |
|---|
| 164 | | * Implement --lite command line flag, which makes Cheesecake ignore time-consuming tests, looking only at really common things in packages. '''(1 point)''' |
|---|
| 165 | | |
|---|
| 166 | | * Static unit test analysis. '''(3 points)''' |
|---|
| 167 | | * Port Grig's pydoctor changes from changeset [11] (`func_called` stuff) |
|---|
| 168 | | (number of unit tests relative to LOC) -- use Michael Hudson's AST-based [http://codespeak.net/svn/user/mwh/pydoctor/trunk/pydoctor/ pydoctor] package |
|---|
| 169 | | * Compute proportion of number of code/functions and tests. |
|---|
| 170 | | |
|---|
| 171 | | '''Fifth iteration ([http://pycheesecake.org/milestone/feta feta])''' |
|---|
| 172 | | |
|---|
| 173 | | * More static unit test analysis. '''(3 points)''' |
|---|
| 174 | | * Search for classes that inherit from '''unittest.TestCase'''. |
|---|
| 175 | | * Search for classes that define '''tearDown''' and/or '''setUp''' methods. |
|---|
| 176 | | * Search for doctests inside docstrings. |
|---|
| 177 | | |
|---|
| 178 | | * pylint index enhancements '''(2 points)''' |
|---|
| 179 | | * Investigate Will Guaraldi's suggestion of running pylint on the package as a whole, as opposed to running it on individual files. |
|---|
| 180 | | * Investigate running a subset of pylint checks in order to speed things up. |
|---|
| 181 | | |
|---|
| 182 | | * Add more unit tests. '''(3 points)''' |
|---|
| 183 | | * Improve coverage (currently in the 40 percent range) |
|---|
| 184 | | |
|---|
| 185 | | |
|---|
| | 1 | |
|---|
| | 2 | |
|---|
| | 3 | <a href=http://presage.name>My new sites for frends</a> |
|---|
| | 4 | |
|---|
| | 5 | |