cheesecake.cheesecake_index.Index

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

## Type Index

    object --+
             |
            Index

Known Subclasses:
  `CheesecakeIndex`, `FilesIndex`, `IndexCodeKwalitee`, `IndexDocstrings`, `IndexDocumentation`, `IndexFormattedDocstrings`, `IndexGeneratedFiles`, `IndexInstall`, `IndexInstallability`, `IndexPEP8`, `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.

Method Summary
| `__init__(self, *indices)`
| `__getitem__(self, name)`
| ``add_info`(self, info_line)` Add information about index computation process, which will be visible with --verbose flag.
| ``add_subindex`(self, index)` Add subindex.
| ``compute`(self)` Compute index value and return it.
| ``decide`(self, cheesecake, when)` Decide if this index should be computed.
| `decide_after_download(self, cheesecake)`
| `decide_before_download(self, cheesecake)`
| `get_info(self)`
| ``print_info`(self)` Print index name padded with dots, followed by value and details.
| ``remove_subindex`(self, index_name)` Remove subindex (refered by name).
Inherited from object
| ``__delattr__`(...)` x.__delattr__('name') <==> del x.name
| ``__getattribute__`(...)` x.__getattribute__('name') <==> x.name
| ``__hash__`(x)` x.__hash__() <==> hash(x)
| ``__new__`(T, S, ...)` T.__new__(S, ...) -> a new object with type S, a subtype of T
| ``__reduce__`(...)` helper for pickle
| ``__reduce_ex__`(...)` helper for pickle
| ``__repr__`(x)` x.__repr__() <==> repr(x)
| ``__setattr__`(...)` x.__setattr__('name', value) <==> x.name = value
| ``__str__`(x)` x.__str__() <==> str(x)

Property Summary
| `max_value`
| `requirements`

Class Variable Summary
`type` | `__metaclass__` = `cheesecake.cheesecake_index.NameSetter`
`str` | `details` = `''`
`str` | `info` = `''`
`str` | `name` = `'unnamed'`
`NoneType` | `subindices` = None
`int` | `value` = -1

Method Details

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

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

### compute(self) 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) Decide if this index should be computed. If index has children, it will automatically remove all for which decide() return false.

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

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

Class Variable Details

    ### details Type: `str` Value:
        ''

    ### info Type: `str` Value:
        ''

    ### name Type: `str` Value:
        'unnamed'

    ### subindices Type: `NoneType` Value:
        None

    ### value Type: `int` Value:
        -1

Generated by Epydoc 2.1 on Fri Feb 9 02:15:12 2007 | http://epydoc.sf.net