From 5da109d02349c4abfb00c7b9a4af33882a79194c Mon Sep 17 00:00:00 2001 From: John Kerl Date: Fri, 15 Jul 2022 17:07:27 -0400 Subject: [PATCH] trivial formatting update for ingest progress --- apis/python/src/tiledbsc/assay_matrix.py | 39 +++++++++++++----------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/apis/python/src/tiledbsc/assay_matrix.py b/apis/python/src/tiledbsc/assay_matrix.py index 4e37cedb93..d41bb0606a 100644 --- a/apis/python/src/tiledbsc/assay_matrix.py +++ b/apis/python/src/tiledbsc/assay_matrix.py @@ -382,12 +382,13 @@ def ingest_data_rows_chunked( chunk_seconds = t2 - t1 eta = eta_tracker.ingest_and_predict(chunk_percent, chunk_seconds) - log_io( - "... %s %7.3f%% done, ETA %s" - % (os.path.basename(self.uri), chunk_percent, eta), - "%sFINISH chunk in %.3f seconds, %7.3f%% done, ETA %s" - % (self._indent, chunk_seconds, chunk_percent, eta), - ) + if chunk_percent < 100: + log_io( + "... %s %7.3f%% done, ETA %s" + % (self.nested_name, chunk_percent, eta), + "%sFINISH chunk in %.3f seconds, %7.3f%% done, ETA %s" + % (self._indent, chunk_seconds, chunk_percent, eta), + ) i = i2 @@ -487,12 +488,13 @@ def ingest_data_cols_chunked( chunk_seconds = t2 - t1 eta = eta_tracker.ingest_and_predict(chunk_percent, chunk_seconds) - log_io( - "... %s %7.3f%% done, ETA %s" - % (os.path.basename(self.uri), chunk_percent, eta), - "%sFINISH chunk in %.3f seconds, %7.3f%% done, ETA %s" - % (self._indent, chunk_seconds, chunk_percent, eta), - ) + if chunk_percent < 100: + log_io( + "... %s %7.3f%% done, ETA %s" + % (self.nested_name, chunk_percent, eta), + "%sFINISH chunk in %.3f seconds, %7.3f%% done, ETA %s" + % (self._indent, chunk_seconds, chunk_percent, eta), + ) j = j2 @@ -594,12 +596,13 @@ def ingest_data_dense_rows_chunked( chunk_seconds = t2 - t1 eta = eta_tracker.ingest_and_predict(chunk_percent, chunk_seconds) - log_io( - "... %s %7.3f%% done, ETA %s" - % (os.path.basename(self.uri), chunk_percent, eta), - "%sFINISH chunk in %.3f seconds, %7.3f%% done, ETA %s" - % (self._indent, chunk_seconds, chunk_percent, eta), - ) + if chunk_percent < 100: + log_io( + "... %s %7.3f%% done, ETA %s" + % (self.nested_name, chunk_percent, eta), + "%sFINISH chunk in %.3f seconds, %7.3f%% done, ETA %s" + % (self._indent, chunk_seconds, chunk_percent, eta), + ) i = i2