dvc: feedback to #2112 round 1

This commit is contained in:
Jorge Orpinel
2019-06-26 16:25:56 -05:00
parent bac1e60e49
commit 91bd0faa87
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -206,7 +206,7 @@ class Stage(object):
@property
def is_callback(self):
"""
An orphan stage is always considered as changed,
A callback stage is always considered as changed,
so it runs on every `dvc repro` call.
"""
return not self.is_data_source and len(self.deps) == 0
@@ -229,7 +229,7 @@ class Stage(object):
if self.is_callback:
logger.warning(
"DVC-file '{fname}' is an 'orphan' stage "
"DVC-file '{fname}' is an 'callback' stage "
"(has a command and no dependencies) and thus always "
"considered as changed.".format(fname=self.relpath)
)
+3 -2
View File
@@ -424,7 +424,7 @@ class TestShouldThrowProperExceptionOnCorruptedStageFile(TestDvc):
foo_stage = relpath(self.FOO + Stage.STAGE_FILE_SUFFIX)
# corrupt DVC-file
# corrupt stage file
with open(foo_stage, "a+") as file:
file.write("this will break yaml file structure")
@@ -475,7 +475,8 @@ class TestShouldCleanUpAfterFailedAdd(TestDvcGit):
self.assertEqual(0, ret)
foo_stage_file = self.FOO + Stage.STAGE_FILE_SUFFIX
# corrupt DVC-file
# corrupt stage file
with open(foo_stage_file, "a+") as file:
file.write("this will break yaml file structure")