Merged in somethingfishy (pull request #13)

Fixing fish progress bars

Approved-by: Jeff
This commit is contained in:
ksorathia
2025-07-29 13:39:54 +00:00
3 changed files with 6 additions and 5 deletions

View File

@@ -275,7 +275,7 @@ class GameraPipe(object):
for data,vID in coords:
datasets = []
with alive_bar(NrX,title=f"{titStr}/{vID}".ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef) as bar, \
with alive_bar(NrX,title=f"{titStr}/{vID}".ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef2) as bar, \
ProcessPoolExecutor(max_workers=self.nWorkers) as executor:
futures = [executor.submit(kh5.PullVarLoc, fIn, vID, loc=loc) for fIn, loc in files]
for future in as_completed(futures):
@@ -328,7 +328,7 @@ class GameraPipe(object):
else:
titStr = None
NrX = max(self.Nr,1)
with alive_bar(NrX,title=titStr,length=kdefs.barLen) as bar:
with alive_bar(NrX,title=titStr,length=kdefs.barLen,bar=kdefs.barDef2) as bar:
for (i,j,k) in itertools.product(range(self.Ri),range(self.Rj),range(self.Rk)):
iS = i *self.dNi
jS = j *self.dNj
@@ -454,7 +454,7 @@ class GameraPipe(object):
else:
titStr = ''
NrX = max(self.Nr,1)
with alive_bar(NrX,title=titStr.ljust(kdefs.barLab),length=kdefs.barLen,disable=not doVerb) as bar:
with alive_bar(NrX,title=titStr.ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef,disable=not doVerb) as bar:
for (i,j,k) in itertools.product(range(self.Ri),range(self.Rj),range(self.Rk)):
iS = i*self.dNi

View File

@@ -111,7 +111,8 @@ vc_cgs = 2.99792458e10 # [cm/s] speed of light
barLen = 30
barLab = 30
#barDef = 'fish'
barDef = alive_progress.animations.bars.bar_factory(tip="><('>", chars='',background='')
barDef = alive_progress.animations.bars.bar_factory(tip="><('>", chars="",background="")
barDef2 = alive_progress.animations.bars.bar_factory('∙○⦿●',tip=" ><>")
#------
# I/O

View File

@@ -284,7 +284,7 @@ def main():
#Loop over sub-range
titstr = "Comparing '%s' to '%s'"%(fdir1,fdir2)
with alive_bar(Nt,title=titstr.ljust(kdefs.barLab),length=kdefs.barLen,disable=doVerb) as bar:
with alive_bar(Nt,title=titstr.ljust(kdefs.barLab),length=kdefs.barLen,bar=kdefs.barDef,disable=doVerb) as bar:
#with concurrent.futures.ThreadPoolExecutor(max_workers=Nth) as executor:
with concurrent.futures.ProcessPoolExecutor(max_workers=Nth) as executor:
m = multiprocessing.Manager()