interfaces.py
brancholdstable
changeset 4985 02b52bf9f5f8
parent 4936 a4b772a0d801
child 5309 e8567135a927
equal deleted inserted replaced
4563:c25da7573ebd 4985:02b52bf9f5f8
    54 
    54 
    55 
    55 
    56 class IProgress(Interface):
    56 class IProgress(Interface):
    57     """something that has a cost, a state and a progression
    57     """something that has a cost, a state and a progression
    58 
    58 
    59     Take a look at cubicweb.common.mixins.ProgressMixIn for some
    59     Take a look at cubicweb.mixins.ProgressMixIn for some
    60     default implementations
    60     default implementations
    61     """
    61     """
    62 
    62 
    63     @property
    63     @property
    64     def cost(self):
    64     def cost(self):
    74 
    74 
    75     def progress_info(self):
    75     def progress_info(self):
    76         """returns a dictionary describing progress/estimated cost of the
    76         """returns a dictionary describing progress/estimated cost of the
    77         version.
    77         version.
    78 
    78 
    79         mandatory keys are (''estimated', 'done', 'todo')
    79         - mandatory keys are (''estimated', 'done', 'todo')
    80         optional keys are ('notestimated', 'notestimatedcorrected',
    80 
    81                            'estimatedcorrected')
    81         - optional keys are ('notestimated', 'notestimatedcorrected',
    82        'noestimated' and 'notestimatedcorrected' should default to 0
    82           'estimatedcorrected')
    83        'estimatedcorrected' should default to 'estimated'
    83 
    84        """
    84         'noestimated' and 'notestimatedcorrected' should default to 0
       
    85         'estimatedcorrected' should default to 'estimated'
       
    86         """
    85 
    87 
    86     def finished(self):
    88     def finished(self):
    87         """returns True if status is finished"""
    89         """returns True if status is finished"""
    88 
    90 
    89     def in_progress(self):
    91     def in_progress(self):