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

Class FilesIndex
source code

object --+    
         |    
     Index --+
             |
            FilesIndex
Known Subclasses:
IndexRequiredFiles, IndexSetupPy

Nested Classes [hide private]

Inherited from Index: __metaclass__


Instance Methods [hide private]
  _compute_from_rules(self, files_list, package_dir, files_rules)
  get_score(self, name, specs)
  get_not_used(self, files_rules)
Get only these of files_rules that didn't match during computation.
  match_filename(self, name, rule)
Check if name matches given rule.

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

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


Class Variables [hide private]
_used_rules  
name  

Inherited from Index: details, info, subindices, value

Inherited from object: __class__


Properties [hide private]

Inherited from Index: max_value, requirements


Method Details [hide private]

_compute_from_rules(self, files_list, package_dir, files_rules)

source code 

get_score(self, name, specs)

source code 

get_not_used(self, files_rules)

source code 

Get only these of files_rules that didn't match during computation.

>>> rules = {
...     Doc('readme'): 30,
...     OneOf(Doc('license'), Doc('copying')): 30,
...     'demo': 10,
... }
>>> index = FilesIndex()
>>> index._used_rules.append('demo')
>>> map(lambda x: str(x), index.get_not_used(rules.keys()))
['license/license.html/license.txt/copying/copying.html/copying.txt', 'readme/readme.html/readme.txt']

match_filename(self, name, rule)

source code 
Check if name matches given rule.

Class Variable Details [hide private]

_used_rules

Value:
[]                                                                     
      

name

Value:
'FilesIndex'