mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
dvc: feedback to #2112 round 1
This commit is contained in:
+2
-2
@@ -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)
|
||||
)
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user