Skip to content

Commit

Permalink
Merge pull request #947 from koordinates/smoother-checkout-progressbar
Browse files Browse the repository at this point in the history
checkout: Smoother progress bar
  • Loading branch information
craigds committed Nov 21, 2023
2 parents 47083a8 + c40aa10 commit c956505
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ _When adding new entries to the changelog, please include issue/PR numbers where
- Some tweaks to `--dry-run` output of Kart LFS commands. [#932](https://github.com/koordinates/kart/pull/932)
- Now using Python 3.11 to build Kart, and vendored dependencies have been updated to newer versions. [#933](https://github.com/koordinates/kart/pull/933)
- Adds support for importing point-cloud and raster tiles directly from an S3 URL. [#940](https://github.com/koordinates/kart/pull/940)
- `checkout`: Smoother progressbar updates

## 0.14.2

Expand Down
3 changes: 2 additions & 1 deletion kart/progress_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ def progress_bar(*args, show_progress=None, disable=None, **kwargs):
elif disable is None and os.environ.get("KART_SHOW_PROGRESS"):
disable = False

kwargs = {"smoothing": 0.1, **kwargs}
tqdm_progress_bar = tqdm.tqdm(*args, disable=disable, **kwargs)
try:
tqdm_progress_bar = tqdm.tqdm(*args, disable=disable, **kwargs)
yield tqdm_progress_bar
finally:
tqdm_progress_bar.close()
3 changes: 1 addition & 2 deletions kart/tabular/working_copy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,8 +989,7 @@ def write_full(self, target_commit, *datasets):
sql = self.insert_into_dataset_cmd(dataset)
t0 = time.monotonic()

CHUNK_SIZE = 10000

CHUNK_SIZE = 2000
for row_dicts in chunk(
dataset.features_with_crs_ids(
self.repo.spatial_filter, show_progress=True
Expand Down

0 comments on commit c956505

Please sign in to comment.