mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
fetch: show progress when collecting
This commit is contained in:
+8
-1
@@ -33,6 +33,7 @@ def fetch( # noqa: C901, PLR0913
|
||||
config.NoRemoteError: thrown when downloading only local files and no
|
||||
remote is configured
|
||||
"""
|
||||
from dvc.fs.callbacks import Callback
|
||||
from dvc_data.index.fetch import fetch as ifetch
|
||||
|
||||
if isinstance(targets, str):
|
||||
@@ -65,8 +66,14 @@ def fetch( # noqa: C901, PLR0913
|
||||
if remote:
|
||||
self.config["core"]["remote"] = remote
|
||||
|
||||
with Callback.as_tqdm_callback(
|
||||
desc="Fetching",
|
||||
unit="file",
|
||||
) as cb:
|
||||
fetch_transferred, fetch_failed = ifetch(
|
||||
_indexes(), jobs=jobs
|
||||
_indexes(),
|
||||
jobs=jobs,
|
||||
callback=cb,
|
||||
) # pylint: disable=assignment-from-no-return
|
||||
finally:
|
||||
if remote:
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ dependencies = [
|
||||
"configobj>=5.0.6",
|
||||
"distro>=1.3",
|
||||
"dpath<3,>=2.1.0",
|
||||
"dvc-data>=1.2.0,<1.3.0",
|
||||
"dvc-data>=1.2.1,<1.3.0",
|
||||
"dvc-http>=2.29.0",
|
||||
"dvc-render>=0.3.1,<1",
|
||||
"dvc-studio-client>=0.9.2,<1",
|
||||
|
||||
Reference in New Issue
Block a user