Progress.ProgessUtils#

Progress.ProgressUtils.py

class ProgressUnit(id_, num_steps, queue_, logger)#

Bases: object

A unit of progress tracking. This class represents a single unit of progress that can be tracked. It allows for tracking the number of steps completed and provides methods to mark steps as done. .. attribute:: id_

Unique identifier for the progress unit.

type:

int

num_steps#

Total number of steps in this unit.

Type:

int

num_done#

Number of steps completed.

Type:

int

queue_#

Queue to send progress updates.

Type:

queue.Queue

logger#

Logger for logging progress updates.

Type:

logging.Logger

step_done()#
all_done()#
tell_error()#

Returns the current progress as a tuple of (id, num_done, False).

class ProgressSet(timeout=60)#

Bases: object

A set of progress units to track the progress of multiple tasks. This class is used to manage multiple progress units and provide a unified interface for tracking their progress. It allows adding new units, checking their status, and iterating over them. .. attribute:: num_units

Total number of progress units.

type:

int

num_steps#

Total number of steps across all units.

Type:

int

unit_status#

Dictionary to track the status of each unit.

Type:

dict

completed_units#

Number of completed units.

Type:

int

queue_#

Queue to manage progress updates.

Type:

queue.Queue

add_unit(num_steps)#