mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-06 23:09:55 +01:00
dvc repro: report status and command
This commit is contained in:
+8
-1
@@ -8,6 +8,7 @@ from dvc.data_cloud import file_md5
|
||||
from dvc.exceptions import DvcException
|
||||
from dvc.executor import Executor
|
||||
|
||||
|
||||
class OutputError(DvcException):
|
||||
def __init__(self, path, msg):
|
||||
super(OutputError, self).__init__('Output file \'{}\' error: {}'.format(path, msg))
|
||||
@@ -200,6 +201,10 @@ class Stage(object):
|
||||
self.deps = deps
|
||||
self.locked = locked
|
||||
|
||||
@property
|
||||
def relpath(self):
|
||||
return os.path.relpath(self.path, '.')
|
||||
|
||||
@staticmethod
|
||||
def is_stage_file(path):
|
||||
if not os.path.isfile(path):
|
||||
@@ -236,8 +241,10 @@ class Stage(object):
|
||||
if self.cmd:
|
||||
# Removing outputs only if we actually have command to reproduce
|
||||
self.remove_outs()
|
||||
|
||||
self.project.logger.info("Reproducing {}:\n\t{}".format(self.relpath, self.cmd))
|
||||
self.run()
|
||||
self.project.logger.debug("{} reproduced".format(self.path))
|
||||
self.project.logger.debug("{} was reproduced".format(self.relpath))
|
||||
|
||||
@staticmethod
|
||||
def loadd(project, d, path):
|
||||
|
||||
Reference in New Issue
Block a user