Show
Ignore:
Timestamp:
07/26/06 17:10:45 (7 years ago)
Author:
mk
Message:

Added missing indices docstrings.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/cheesecake/cheesecake_index.py

    r111 r114  
    662662 
    663663class IndexUrlDownload(Index): 
     664    """Give points for successful downloading of a package. 
     665    """ 
    664666    max_value = 25 
    665667 
     
    677679 
    678680class IndexUnpack(Index): 
     681    """Give points for successful unpacking of a package archive. 
     682    """ 
    679683    max_value = 25 
    680684 
     
    684688            self.value = self.max_value 
    685689        else: 
     690            self.details = "package couldn't be unpacked" 
    686691            self.value = 0 
    687692 
     
    689694 
    690695class IndexUnpackDir(Index): 
     696    """Check if package unpack directory resembles package archive name. 
     697    """ 
    691698    max_value = 15 
    692699 
     
    707714 
    708715class IndexSetupPy(FilesIndex): 
     716    """Reward packages that have setup.py file. 
     717    """ 
    709718    name = "setup.py" 
    710719    max_value = 25 
     
    728737 
    729738class IndexInstall(Index): 
     739    """Check if package can be installed via "python setup.py" command. 
     740    """ 
    730741    max_value = 50 
    731742 
     
    744755 
    745756class IndexPyPIDownload(Index): 
     757    """Check if package was successfully downloaded from PyPI 
     758    and how far from it actual package was. 
     759 
     760    Distance is number of links user have to follow to download 
     761    a given software package. 
     762    """ 
    746763    max_value = 50 
    747764    distance_penalty = -5 
     
    776793 
    777794class IndexGeneratedFiles(Index): 
     795    """Lower score for automatically generated files that should 
     796    not be present in a package. 
     797    """ 
    778798    generated_files_penalty = -20 
    779799    max_value = 0 
     
    814834 
    815835class IndexRequiredFiles(FilesIndex): 
     836    """Check for existence of important files, like README or INSTALL. 
     837    """ 
    816838    cheese_files = { 
    817839        Doc('readme'): 30, 
     
    841863        def make_info(dictionary, what): 
    842864            missing = self.get_not_used(dictionary.keys()) 
    843             importance = {30: ' critical', 20: ' important', 10: ''
     865            importance = {30: ' critical', 20: ' important'
    844866            info = [] 
    845867 
     
    851873                if key in missing: 
    852874                    msg = negative_msg 
    853                 info.append(msg % (index_class_to_name(self.name), importance[dictionary[key]], what, str(key))) 
     875                info.append(msg % (index_class_to_name(self.name), importance.get(dictionary[key], ''), what, str(key))) 
    854876 
    855877            return ''.join(info) 
     
    871893 
    872894class IndexDocstrings(Index): 
     895    """Compute how many objects have relevant docstrings. 
     896    """ 
    873897    max_value = 100 
    874898 
     
    887911 
    888912class IndexFormattedDocstrings(Index): 
     913    """Compute how many of existing docstrings include any formatting, 
     914    like epytext or reST. 
     915    """ 
    889916    max_value = 30 
    890917 
     
    959986class IndexUseTestFramework(Index): 
    960987    """Check if a package uses any of known test frameworks. 
    961  
    962     Currently only checking for doctest. 
    963988    """ 
    964989    max_value = 30 
  • branches/mk/cheesecake/util.py

    r108 r114  
     1"""Utility functions for Cheesecake project. 
     2""" 
     3 
    14import os 
    25import shutil