Get accurate progress of read displayed in the GUI.
Problem
One cannot simply wrap the numba ProgressBar apparently. Basically I would like to not only update the CLI progress bar, but also send an update via RPC, i.e. call a regular Python function on each update.
I tried replacing the numba ProgressBar with the following, which resulted in weird errors.
from numba_progress import ProgressBar
from ..rpc.client import ReadUpdateClient
class PacketProgressBar(ProgressBar):
def __init__(self, **kwargs):
super().__init__(kwargs)
self.client = ReadUpdateClient()
self.total_num_packets = kwargs["total"]
def update(self, value: int):
super().update(value)
pct = int(100 * value / self.total_num_packets)
self.client.send_update(pct)
Aim
Get accurate progress of read displayed in the GUI.
Problem
One cannot simply wrap the numba
ProgressBar
apparently. Basically I would like to not only update the CLI progress bar, but also send an update via RPC, i.e. call a regular Python function on each update.I tried replacing the numba
ProgressBar
with the following, which resulted in weird errors.