Package cheesecake :: Module cheesecake_index :: Class IndexPyPIDownload
[hide private]
[frames] | no frames]

Class IndexPyPIDownload
source code

object --+    
         |    
     Index --+
             |
            IndexPyPIDownload

Check if package was successfully downloaded from PyPI and how far from it actual package was.

Distance is number of links user have to follow to download a given software package.



Nested Classes [hide private]

Inherited from Index: __metaclass__


Instance Methods [hide private]
  compute(self, package, found_on_cheeseshop, found_locally, distance_from_pypi, download_url)
Compute index value and return it.
  decide_before_download(self, cheesecake)

Inherited from Index: __getitem__, __init__, add_info, add_subindex, compute_with, decide, decide_after_download, get_info, print_info, remove_subindex

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Class Variables [hide private]
max_value  
distance_penalty  
name  

Inherited from Index: details, info, subindices, value

Inherited from object: __class__


Properties [hide private]

Inherited from Index: requirements


Method Details [hide private]

compute(self, package, found_on_cheeseshop, found_locally, distance_from_pypi, download_url)

source code 

Compute index value and return it.

By default this method computes sum of all subindices. Override this method when subclassing for different behaviour.

Parameters to this function are dynamically prepared with use of get_attributes function.

Overrides: Index.compute
(inherited documentation)

decide_before_download(self, cheesecake)

source code 
Overrides: Index.decide_before_download

Class Variable Details [hide private]

max_value

Value:
50                                                                    
      

distance_penalty

Value:
-5                                                                    
      

name

Value:
'IndexPyPIDownload'