Skip to content

Commit eedd9cd

Browse files
committed
address @dmitry's comments
1 parent fce08fa commit eedd9cd

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

dvc/dvcfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _dump_pipeline_file(self, stage):
197197
with open(self.path) as fd:
198198
data = parse_stage_for_update(fd.read(), self.path)
199199
else:
200-
logger.info("'%s' does not exist, creating…", self.relpath)
200+
logger.info("Creating '%s'", self.relpath)
201201
open(self.path, "w+").close()
202202

203203
data["stages"] = data.get("stages", {})
@@ -209,7 +209,7 @@ def _dump_pipeline_file(self, stage):
209209
data["stages"].update(stage_data)
210210

211211
logger.info(
212-
"Adding stage '%s' to '%s'", stage.name, self.relpath,
212+
"Adding stage '%s' to '%s'", stage.name, self.relpath,
213213
)
214214
dump_stage_file(self.path, data)
215215
self.repo.scm.track_file(relpath(self.path))
@@ -255,7 +255,7 @@ def dump(self, stage, **kwargs):
255255
stage_data = serialize.to_lockfile(stage)
256256
if not self.exists():
257257
modified = True
258-
logger.info("Generating lock file…")
258+
logger.info("Generating lock file '%s'", self.relpath)
259259
data = stage_data
260260
open(self.path, "w+").close()
261261
else:
@@ -265,7 +265,7 @@ def dump(self, stage, **kwargs):
265265
stage.name, {}
266266
)
267267
if modified:
268-
logger.info("Updating lock file…")
268+
logger.info("Updating lock file '%s'", self.relpath)
269269
data.update(stage_data)
270270
dump_stage_file(self.path, data)
271271
if modified:

dvc/repo/reproduce.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,10 @@ def _reproduce_stages(
164164

165165
force_downstream = kwargs.pop("force_downstream", False)
166166
result = []
167-
for idx, stage in enumerate(pipeline):
168-
if idx != 0:
169-
# Cosmetic newline
167+
# `ret` is used to add a cosmetic newline.
168+
ret = []
169+
for stage in pipeline:
170+
if ret:
170171
logger.info("")
171172

172173
try:

dvc/stage/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def create_stage(cls, repo, path, **kwargs):
7777
logger.warning("Build cache is ignored when persisting outputs.")
7878

7979
if not ignore_run_cache and stage.can_be_skipped:
80-
logger.info("Stage is cached, skipping")
80+
logger.info("Stage is cached, skipping")
8181
return None
8282

8383
return stage
@@ -294,7 +294,7 @@ def remove(self, force=False, remove_outs=True):
294294
@rwlocked(read=["deps"], write=["outs"])
295295
def reproduce(self, interactive=False, **kwargs):
296296
if not (kwargs.get("force", False) or self.changed()):
297-
logger.info("Stage '%s' didn't change, skipping", self.addressing)
297+
logger.info("Stage '%s' didn't change, skipping", self.addressing)
298298
return None
299299

300300
msg = (

dvc/stage/run.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _is_cached(stage):
8585
and stage.already_cached()
8686
)
8787
if cached:
88-
logger.info("Stage '%s' is cached, skipping…", stage.addressing)
88+
logger.info("Stage '%s' is cached", stage.addressing)
8989
return cached
9090

9191

@@ -98,9 +98,7 @@ def restored_from_cache(stage):
9898
stage_cache.restore(stage)
9999
restored = stage.outs_cached()
100100
if restored:
101-
logger.info(
102-
"Restored stage '%s' from run-cache, skipping…", stage.addressing
103-
)
101+
logger.info("Restored stage '%s' from run-cache", stage.addressing)
104102
return restored
105103

106104

@@ -110,6 +108,7 @@ def run_stage(stage, dry=False, force=False, run_cache=False):
110108
run_cache and restored_from_cache(stage)
111109
)
112110
if stage_cached:
111+
logger.info("Skipping run, checking out outputs")
113112
stage.checkout()
114113
return
115114

0 commit comments

Comments
 (0)