cheesecake.cheesecake_index.Index

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

## Class Index
source code

    object --+
             |
            Index

Known Subclasses:
  CheesecakeIndex, FilesIndex, IndexCodeKwalitee, IndexDocstrings, IndexDocumentation, IndexFormattedDocstrings, IndexGeneratedFiles, IndexInstall, IndexInstallability, IndexPyLint, IndexPyPIDownload, IndexUnitTested, IndexUnitTests, IndexUnpack, IndexUnpackDir, IndexUrlDownload

Class describing one index.

Use it as a container index or subclass to create custom indices.

During class initialization, special attribute name is magically set based on class name. See NameSetter definitions for details.

Nested Classes | [hide private]
__metaclass__ |

Instance Methods | [hide private]
| __init__(self, *indices) x.__init__(...) initializes x; see x.__class__.__doc__ for signature
| _iter_indices(self) Iterate over each subindex and yield their values.
| compute_with(self, cheesecake) Take given Cheesecake instance and compute index value.
| compute(self) Compute index value and return it.
| decide(self, cheesecake, when) Decide if this index should be computed.
| decide_before_download(self, cheesecake)
| decide_after_download(self, cheesecake)
| add_info(self, info_line) Add information about index computation process, which will be visible with --verbose flag.
| _get_max_value(self)
| _get_requirements(self)
| add_subindex(self, index) Add subindex.
| remove_subindex(self, index_name) Remove subindex (refered by name).
| _print_info_one(self)
| _print_info_many(self)
| print_info(self) Print index name padded with dots, followed by value and details.
| __getitem__(self, name)
| get_info(self)
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]
subindices |
name |
value |
details |
info |
Inherited from `object`: `__class__`

Properties | [hide private]
max_value |
requirements |

Method Details | [hide private]

### __init__(self, *indices) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### _iter_indices(self) | source code
Iterate over each subindex and yield their values.

### compute_with(self, cheesecake) | source code
Take given Cheesecake instance and compute index value.

### compute(self) | 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. Warning: Don't use *args and **kwds arguments for this method.

### decide(self, cheesecake, when) | source code
Decide if this index should be computed. If index has children, it will automatically remove all for which decide() return false.

### decide_before_download(self, cheesecake) | source code

### decide_after_download(self, cheesecake) | source code

### add_info(self, info_line) | source code
Add information about index computation process, which will be visible with --verbose flag.

### _get_max_value(self) | source code

### _get_requirements(self) | source code

### add_subindex(self, index) | source code
Add subindex. Parameters: `index` (`Index instance`) - Index instance for inclusion.

### remove_subindex(self, index_name) | source code
Remove subindex (refered by name). Parameters: `index` (`Index name`) - Index name to be removed.

### _print_info_one(self) | source code

### _print_info_many(self) | source code

### print_info(self) | source code
Print index name padded with dots, followed by value and details.

### __getitem__(self, name) (Indexing operator) | source code

### get_info(self) | source code

Class Variable Details | [hide private]

    ### subindices Value:
        None

    ### name Value:
        'unnamed'

    ### value Value:
        -1

    ### details Value:
        ''

    ### info Value:
        ''

Property Details | [hide private]

### max_value Get Method: cheesecake.cheesecake_index.Index._get_max_value(self) Set Method: None Delete Method: None

### requirements Get Method: cheesecake.cheesecake_index.Index._get_requirements(self) Set Method: None Delete Method: None