mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
dvc: don't check if stage is changed twice
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+4
-5
@@ -125,12 +125,11 @@ class Project(object):
|
||||
return stage
|
||||
|
||||
def _reproduce_stage(self, stages, node, force):
|
||||
if not stages[node].changed() and not force:
|
||||
stage = stages[node].reproduce(force=force)
|
||||
if not stage:
|
||||
return []
|
||||
|
||||
stages[node].reproduce(force=force)
|
||||
stages[node].dump()
|
||||
return [stages[node]]
|
||||
stage.dump()
|
||||
return [stage]
|
||||
|
||||
def reproduce(self, target, recursive=True, force=False):
|
||||
stages = nx.get_node_attributes(self.graph(), 'stage')
|
||||
|
||||
+3
-1
@@ -80,7 +80,7 @@ class Stage(object):
|
||||
|
||||
def reproduce(self, force=False):
|
||||
if not self.changed() and not force:
|
||||
return
|
||||
return None
|
||||
|
||||
if self.cmd:
|
||||
# Removing outputs only if we actually have command to reproduce
|
||||
@@ -88,6 +88,8 @@ class Stage(object):
|
||||
|
||||
self.run()
|
||||
|
||||
return self
|
||||
|
||||
@staticmethod
|
||||
def loadd(project, d, path):
|
||||
path = os.path.abspath(path)
|
||||
|
||||
Reference in New Issue
Block a user