From 9dcb8350b41dcc617ab06eda37757dbcc39d72de Mon Sep 17 00:00:00 2001 From: root-11 <4048422+root-11@users.noreply.github.com> Date: Fri, 24 Nov 2023 08:56:07 +0000 Subject: [PATCH] Adding cascade for pbar and tqdm for sort --- tablite/sortation.py | 10 +++++----- tablite/version.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tablite/sortation.py b/tablite/sortation.py index 4082d336..be139595 100644 --- a/tablite/sortation.py +++ b/tablite/sortation.py @@ -91,13 +91,13 @@ def reindex(T, index): return m(T, index) -def _sp_reindex(T, index): - return _reindex(T, index) +def _sp_reindex(T, index, tqdm=_tqdm, pbar=None): + return _reindex(T, index, tqdm=tqdm, pbar=pbar) -def _mp_reindex(T, index): +def _mp_reindex(T, index, tqdm=_tqdm, pbar=None): assert isinstance(index, np.ndarray) - return _sp_reindex(T, index) + return _sp_reindex(T, index, tqdm=tqdm, pbar=pbar) index, shm = share_mem(index, dtype=index.dtype) # shm = shared_memory.SharedMemory(create=True, size=index.nbytes) # the co_processors will read this. @@ -154,7 +154,7 @@ def sort(T, mapping, sort_mode="excel", tqdm=_tqdm, pbar: _tqdm = None): index = sort_index(T, mapping, sort_mode=sort_mode, tqdm=_tqdm, pbar=pbar) m = select_processing_method(len(T) * len(T.columns), _sp_reindex, _mp_reindex) - return m(T, index) + return m(T, index, tqdm=tqdm, pbar=pbar) def is_sorted(T, mapping, sort_mode="excel"): diff --git a/tablite/version.py b/tablite/version.py index 7e16cc6e..965c2d7e 100644 --- a/tablite/version.py +++ b/tablite/version.py @@ -1,3 +1,3 @@ -major, minor, patch = 2023, 8, 10 +major, minor, patch = 2023, 8, 11 __version_info__ = (major, minor, patch) __version__ = ".".join(str(i) for i in __version_info__)