From 5d10606e0997d41415e14c856a36c86ddfacc875 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Mon, 25 Nov 2019 23:50:44 +0000 Subject: [PATCH 01/23] remove ETA on completion, minor tidy --- dvc/progress.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dvc/progress.py b/dvc/progress.py index fefbd98f61..4ec93bc5c6 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -33,6 +33,9 @@ class Tqdm(tqdm): "{desc:{ncols_desc}.{ncols_desc}}{n_fmt}" " [{elapsed}11}{postfix}]" ) + BYTES_DEFAULTS = dict( + unit="B", unit_scale=True, unit_divisor=1024, miniters=1 + ) def __init__( self, @@ -60,10 +63,7 @@ def __init__( kwargs = kwargs.copy() kwargs.setdefault("unit_scale", True) if bytes: - bytes_defaults = dict( - unit="B", unit_scale=True, unit_divisor=1024, miniters=1 - ) - kwargs = merge(bytes_defaults, kwargs) + kwargs = merge(self.BYTES_DEFAULTS, kwargs) if file is None: file = sys.stderr self.desc_persist = desc @@ -114,6 +114,10 @@ def update_to(self, current, total=None): def close(self): if self.desc_persist is not None: self.set_description_str(self.desc_persist, refresh=False) + # remove ETA (either zero or unknown) + self.bar_format = self.bar_format.replace(" Date: Tue, 26 Nov 2019 00:37:12 +0000 Subject: [PATCH 02/23] no unit scaling for small totals --- dvc/progress.py | 5 ++++- dvc/repo/add.py | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dvc/progress.py b/dvc/progress.py index 4ec93bc5c6..ed3c462c1b 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -47,6 +47,7 @@ def __init__( bar_format=None, bytes=False, # pylint: disable=W0622 file=None, + total=None, **kwargs ): """ @@ -61,9 +62,10 @@ def __init__( kwargs : anything accepted by `tqdm.tqdm()` """ kwargs = kwargs.copy() - kwargs.setdefault("unit_scale", True) if bytes: kwargs = merge(self.BYTES_DEFAULTS, kwargs) + else: + kwargs.setdefault("unit_scale", total > 999 if total else True) if file is None: file = sys.stderr self.desc_persist = desc @@ -84,6 +86,7 @@ def __init__( desc=desc, bar_format="!", lock_args=(False,), + total=total, **kwargs ) if bar_format is None: diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 51fc417f8e..5e8da0b967 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -54,8 +54,6 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): stage.dump() stages_list += stages - # remove filled bar bit of progress, leaving stats - pbar.bar_format = pbar.BAR_FMT_DEFAULT.replace("|{bar:10}|", " ") return stages_list From eb05f8bd0cb3b4f9080d7c589c7b7a7e0775138d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Tue, 26 Nov 2019 00:37:38 +0000 Subject: [PATCH 03/23] clean output cleaning (meta) --- dvc/progress.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dvc/progress.py b/dvc/progress.py index ed3c462c1b..bb1b936987 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -117,10 +117,15 @@ def update_to(self, current, total=None): def close(self): if self.desc_persist is not None: self.set_description_str(self.desc_persist, refresh=False) - # remove ETA (either zero or unknown) - self.bar_format = self.bar_format.replace(" Date: Tue, 26 Nov 2019 00:40:25 +0000 Subject: [PATCH 04/23] black --- dvc/output/base.py | 2 +- dvc/repo/__init__.py | 4 ++-- dvc/repo/get_url.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dvc/output/base.py b/dvc/output/base.py index ee69e30bcd..536b4950ce 100644 --- a/dvc/output/base.py +++ b/dvc/output/base.py @@ -405,7 +405,7 @@ def get_used_cache(self, **kwargs): if self.stage.is_repo_import: cache = NamedCache() - dep, = self.stage.deps + (dep,) = self.stage.deps cache.external[dep.repo_pair].add(dep.def_path) return cache diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 9d0a506a87..bc90b89e77 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -205,7 +205,7 @@ def collect_granular(self, target, *args, **kwargs): return [(stage, None) for stage in self.stages] try: - out, = self.find_outs_by_path(target, strict=False) + (out,) = self.find_outs_by_path(target, strict=False) filter_info = PathInfo(os.path.abspath(target)) return [(out.stage, filter_info)] except OutputNotFoundError: @@ -419,7 +419,7 @@ def func(out): def find_out_by_relpath(self, relpath): path = os.path.join(self.root_dir, relpath) - out, = self.find_outs_by_path(path) + (out,) = self.find_outs_by_path(path) return out def is_dvc_internal(self, path): diff --git a/dvc/repo/get_url.py b/dvc/repo/get_url.py index fbc173b640..5718b20ecd 100644 --- a/dvc/repo/get_url.py +++ b/dvc/repo/get_url.py @@ -14,6 +14,6 @@ def get_url(url, out=None): out = os.path.abspath(out) - dep, = dependency.loads_from(None, [url]) - out, = output.loads_from(None, [out], use_cache=False) + (dep,) = dependency.loads_from(None, [url]) + (out,) = output.loads_from(None, [out], use_cache=False) dep.download(out) From 426972e55f155d817e1db975afa2f25dbf860445 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 21:40:19 +0000 Subject: [PATCH 05/23] disable super progress bar for single-files TODO: actually disable sub-bars instead --- dvc/repo/add.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 5e8da0b967..0b7c4e4c6a 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -23,7 +23,14 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): targets = [targets] stages_list = [] - with Tqdm(total=len(targets), desc="Add", unit="file", leave=True) as pbar: + num_targets = len(targets) + with Tqdm( + total=num_targets, + desc="Add", + unit="file", + leave=True, + disable=True if num_targets < 2 else None, + ) as pbar: for target in targets: sub_targets = _find_all_targets(repo, target, recursive) pbar.total += len(sub_targets) - 1 @@ -55,6 +62,9 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): stages_list += stages + if pbar.disable: + pbar.write("100% Add") + return stages_list From dd341003108b07b05b098a057f42819f4f84d537 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 21:45:31 +0000 Subject: [PATCH 06/23] replace super bar with intermediate "Adding..." for single files --- dvc/repo/add.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 0b7c4e4c6a..1e27a72e18 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -24,13 +24,9 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): stages_list = [] num_targets = len(targets) - with Tqdm( - total=num_targets, - desc="Add", - unit="file", - leave=True, - disable=True if num_targets < 2 else None, - ) as pbar: + with Tqdm(total=num_targets, desc="Add", unit="file", leave=True) as pbar: + if num_targets == 1: + pbar.bar_format = "Adding..." for target in targets: sub_targets = _find_all_targets(repo, target, recursive) pbar.total += len(sub_targets) - 1 @@ -62,8 +58,8 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): stages_list += stages - if pbar.disable: - pbar.write("100% Add") + if num_targets == 1: + pbar.bar_format = pbar.BAR_FMT_DEFAULT return stages_list From 0293f7128c67a9ce58d0dc580d64f324ef02b838 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 21:48:09 +0000 Subject: [PATCH 07/23] minor comment and force refresh --- dvc/repo/add.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 1e27a72e18..dd0581150c 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -26,7 +26,9 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): num_targets = len(targets) with Tqdm(total=num_targets, desc="Add", unit="file", leave=True) as pbar: if num_targets == 1: + # clear unneeded top-level progress bar for single target pbar.bar_format = "Adding..." + pbar.refresh() for target in targets: sub_targets = _find_all_targets(repo, target, recursive) pbar.total += len(sub_targets) - 1 From 80e827095448c9dd6a8eeda331391bf9e47186a3 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 23:02:04 +0000 Subject: [PATCH 08/23] add recursive file find progress for profiling; may need to revert --- dvc/repo/add.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index dd0581150c..da5b9a2f4f 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -70,7 +70,12 @@ def _find_all_targets(repo, target, recursive): if os.path.isdir(target) and recursive: return [ fname - for fname in repo.tree.walk_files(target) + for fname in Tqdm( + repo.tree.walk_files(target), + desc="Finding files", + bar_format=Tqdm.BAR_FMT_NOTOTAL, + leave=False, + ) if not repo.is_dvc_internal(fname) if not Stage.is_stage_file(fname) if not repo.scm.belongs_to_scm(fname) From 3b65181e01aeaa884f3386f131aa2fcf0b09a3c7 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 23:02:45 +0000 Subject: [PATCH 09/23] remove unneeded 11}{postfix}]" + " [{elapsed}, {rate_fmt:>11}{postfix}]" ) BYTES_DEFAULTS = dict( unit="B", unit_scale=True, unit_divisor=1024, miniters=1 From 21c1b266cf4529f37fc476b0cdf668e47fa52ef9 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 23:17:20 +0000 Subject: [PATCH 10/23] add progress for stages; also may need reverting --- dvc/repo/add.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index da5b9a2f4f..b3d24eefb1 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -72,9 +72,9 @@ def _find_all_targets(repo, target, recursive): fname for fname in Tqdm( repo.tree.walk_files(target), - desc="Finding files", + desc="Recursing " + target, bar_format=Tqdm.BAR_FMT_NOTOTAL, - leave=False, + unit="file", ) if not repo.is_dvc_internal(fname) if not Stage.is_stage_file(fname) @@ -87,7 +87,9 @@ def _find_all_targets(repo, target, recursive): def _create_stages(repo, targets, fname, pbar=None): stages = [] - for out in targets: + for out in Tqdm( + targets, desc="Creating stages", disable=len(targets) < LARGE_DIR_SIZE + ): stage = Stage.create(repo, outs=[out], add=True, fname=fname) if not stage: From 866b3cd0ae89d6155e78a69f86e871300f63c52d Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 23:24:09 +0000 Subject: [PATCH 11/23] add progress for save/commit/dump stages --- dvc/repo/add.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index b3d24eefb1..bd615860a6 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -50,7 +50,7 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): repo.check_modified_graph(stages) - for stage in stages: + for stage in Tqdm(stages, desc="Processing", unit="file"): stage.save() if not no_commit: @@ -88,7 +88,10 @@ def _create_stages(repo, targets, fname, pbar=None): stages = [] for out in Tqdm( - targets, desc="Creating stages", disable=len(targets) < LARGE_DIR_SIZE + targets, + desc="Creating stages", + disable=len(targets) < LARGE_DIR_SIZE, + unit="file", ): stage = Stage.create(repo, outs=[out], add=True, fname=fname) From 2a4c30892ec4ac83f2854240a1bd80f39865f4d2 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 23:29:37 +0000 Subject: [PATCH 12/23] tidy close logic --- dvc/progress.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/dvc/progress.py b/dvc/progress.py index c48511c467..25e22fbb0d 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -117,15 +117,10 @@ def update_to(self, current, total=None): def close(self): if self.desc_persist is not None: self.set_description_str(self.desc_persist, refresh=False) - for fmt in [ - " Date: Wed, 27 Nov 2019 23:31:34 +0000 Subject: [PATCH 13/23] minor comment --- dvc/repo/add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index bd615860a6..933df80499 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -60,7 +60,7 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): stages_list += stages - if num_targets == 1: + if num_targets == 1: # restore bar format for stats pbar.bar_format = pbar.BAR_FMT_DEFAULT return stages_list From 25557c5882fbfebd9f3679fe98c389d9a4b04733 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Wed, 27 Nov 2019 23:48:36 +0000 Subject: [PATCH 14/23] remove potential single-iteration bar --- dvc/repo/add.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 933df80499..a36b6619e7 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -50,8 +50,12 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): repo.check_modified_graph(stages) - for stage in Tqdm(stages, desc="Processing", unit="file"): - stage.save() + for stage in Tqdm( + stages, + desc="Processing", + unit="file", + disable=len(stages) == 1, + ): if not no_commit: stage.commit() From a66cc0e5030b9a44b2baae898b3469f260038bf4 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 28 Nov 2019 00:59:11 +0000 Subject: [PATCH 15/23] add saving progress for files in dirs --- dvc/remote/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dvc/remote/base.py b/dvc/remote/base.py index 33ec566bb7..42b283ba37 100644 --- a/dvc/remote/base.py +++ b/dvc/remote/base.py @@ -493,7 +493,9 @@ def _save_dir(self, path_info, checksum): cache_info = self.checksum_to_path_info(checksum) dir_info = self.get_dir_cache(checksum) - for entry in dir_info: + for entry in Tqdm( + dir_info, desc="Saving " + path_info.name, unit="file" + ): entry_info = path_info / entry[self.PARAM_RELPATH] entry_checksum = entry[self.PARAM_CHECKSUM] self._save_file(entry_info, entry_checksum, save_link=False) From 660fcfd10bd3360d0c9f47388dace30d7c2925c9 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 28 Nov 2019 01:04:40 +0000 Subject: [PATCH 16/23] fix disable logic --- dvc/repo/add.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index a36b6619e7..92181c78d2 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -54,7 +54,7 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): stages, desc="Processing", unit="file", - disable=len(stages) == 1, + disable=True if len(stages) == 1 else None, ): if not no_commit: @@ -94,7 +94,7 @@ def _create_stages(repo, targets, fname, pbar=None): for out in Tqdm( targets, desc="Creating stages", - disable=len(targets) < LARGE_DIR_SIZE, + disable=True if len(targets) < LARGE_DIR_SIZE else None, unit="file", ): stage = Stage.create(repo, outs=[out], add=True, fname=fname) From 528dedda03b08c12c02b9a05b306cc3132ffdc79 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sat, 14 Dec 2019 16:44:00 +0000 Subject: [PATCH 17/23] minor import tidy --- dvc/cli.py | 64 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/dvc/cli.py b/dvc/cli.py index 37d148d7c8..320a88ee2a 100644 --- a/dvc/cli.py +++ b/dvc/cli.py @@ -3,37 +3,39 @@ import logging import sys -import dvc.command.add as add -import dvc.command.cache as cache -import dvc.command.checkout as checkout -import dvc.command.commit as commit -import dvc.command.config as config -import dvc.command.daemon as daemon -import dvc.command.data_sync as data_sync -import dvc.command.destroy as destroy -import dvc.command.diff as diff -import dvc.command.gc as gc -import dvc.command.get as get -import dvc.command.get_url as get_url -import dvc.command.imp as imp -import dvc.command.imp_url as imp_url -import dvc.command.init as init -import dvc.command.install as install -import dvc.command.lock as lock -import dvc.command.metrics as metrics -import dvc.command.move as move -import dvc.command.pipeline as pipeline -import dvc.command.remote as remote -import dvc.command.remove as remove -import dvc.command.repro as repro -import dvc.command.root as root -import dvc.command.run as run -import dvc.command.tag as tag -import dvc.command.unprotect as unprotect -import dvc.command.update as update -import dvc.command.version as version -from dvc.command.base import fix_subparsers -from dvc.exceptions import DvcParserError +from .command import ( + add, + cache, + checkout, + commit, + config, + daemon, + data_sync, + destroy, + diff, + gc, + get, + get_url, + imp, + imp_url, + init, + install, + lock, + metrics, + move, + pipeline, + remote, + remove, + repro, + root, + run, + tag, + unprotect, + update, + version, +) +from .command.base import fix_subparsers +from .exceptions import DvcParserError logger = logging.getLogger(__name__) From 6de48d30edb6df8384405c8aa8bed0214607b251 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 16 Jan 2020 20:47:23 +0000 Subject: [PATCH 18/23] replace funcy.merge with py3 syntax --- dvc/progress.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dvc/progress.py b/dvc/progress.py index 25e22fbb0d..d03b037c06 100644 --- a/dvc/progress.py +++ b/dvc/progress.py @@ -4,7 +4,6 @@ import sys from threading import RLock -from funcy import merge from tqdm import tqdm from dvc.utils import env2bool @@ -63,7 +62,7 @@ def __init__( """ kwargs = kwargs.copy() if bytes: - kwargs = merge(self.BYTES_DEFAULTS, kwargs) + kwargs = {**self.BYTES_DEFAULTS, **kwargs} else: kwargs.setdefault("unit_scale", total > 999 if total else True) if file is None: From 7fa5e694b188275e3212e9162c2faa6af7a5b53c Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 16 Jan 2020 21:09:57 +0000 Subject: [PATCH 19/23] silly omission --- dvc/repo/add.py | 1 + 1 file changed, 1 insertion(+) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 92181c78d2..919f2bed6d 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -56,6 +56,7 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): unit="file", disable=True if len(stages) == 1 else None, ): + stage.save() if not no_commit: stage.commit() From 61a1e7f774ae7180152de0b53961ccd9577e0c1c Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 16 Jan 2020 21:25:19 +0000 Subject: [PATCH 20/23] backtrack pbars after failing when adding nonexistent files --- dvc/repo/add.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 919f2bed6d..239177c55d 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -5,6 +5,7 @@ from . import locked from dvc.exceptions import RecursiveAddingWhileUsingFilename +from dvc.output.base import OutputDoesNotExistError from dvc.progress import Tqdm from dvc.repo.scm_context import scm_context from dvc.stage import Stage @@ -50,18 +51,24 @@ def add(repo, targets, recursive=False, no_commit=False, fname=None): repo.check_modified_graph(stages) - for stage in Tqdm( - stages, + with Tqdm( + total=len(stages), desc="Processing", unit="file", disable=True if len(stages) == 1 else None, - ): - stage.save() - - if not no_commit: - stage.commit() - - stage.dump() + ) as pbar_stages: + for stage in stages: + try: + stage.save() + except OutputDoesNotExistError: + pbar.n -= 1 + raise + + if not no_commit: + stage.commit() + + stage.dump() + pbar_stages.update() stages_list += stages From 4ae9b7584bf888b02a6b5ae472eabe4db5b8cf42 Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Thu, 16 Jan 2020 21:28:02 +0000 Subject: [PATCH 21/23] minor import tidy --- dvc/repo/add.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index 239177c55d..b3fec58f7a 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -4,12 +4,12 @@ import colorama from . import locked -from dvc.exceptions import RecursiveAddingWhileUsingFilename -from dvc.output.base import OutputDoesNotExistError -from dvc.progress import Tqdm -from dvc.repo.scm_context import scm_context -from dvc.stage import Stage -from dvc.utils import LARGE_DIR_SIZE +from ..exceptions import RecursiveAddingWhileUsingFilename +from ..output.base import OutputDoesNotExistError +from ..progress import Tqdm +from ..repo.scm_context import scm_context +from ..stage import Stage +from ..utils import LARGE_DIR_SIZE logger = logging.getLogger(__name__) From b49a61d24796efa36365a8e20257ecbd1a9f349e Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sun, 19 Jan 2020 20:40:17 +0000 Subject: [PATCH 22/23] minor message rename Responding to review request --- dvc/repo/add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index b3fec58f7a..b944e94cc5 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -101,7 +101,7 @@ def _create_stages(repo, targets, fname, pbar=None): for out in Tqdm( targets, - desc="Creating stages", + desc="Creating DVC-files", disable=True if len(targets) < LARGE_DIR_SIZE else None, unit="file", ): From ab115dfe74940d6214a72139fbd3efb61ee8eeec Mon Sep 17 00:00:00 2001 From: Casper da Costa-Luis Date: Sun, 26 Jan 2020 23:31:13 +0000 Subject: [PATCH 23/23] Recursing => Searching --- dvc/repo/add.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/repo/add.py b/dvc/repo/add.py index b944e94cc5..e469119b93 100644 --- a/dvc/repo/add.py +++ b/dvc/repo/add.py @@ -84,7 +84,7 @@ def _find_all_targets(repo, target, recursive): fname for fname in Tqdm( repo.tree.walk_files(target), - desc="Recursing " + target, + desc="Searching " + target, bar_format=Tqdm.BAR_FMT_NOTOTAL, unit="file", )