mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
.dvc file: remove metrics/plots support (#9552)
This commit is contained in:
@@ -298,15 +298,6 @@ class Output:
|
||||
PARAM_PUSH = "push"
|
||||
PARAM_CLOUD = "cloud"
|
||||
|
||||
METRIC_SCHEMA = Any(
|
||||
None,
|
||||
bool,
|
||||
{
|
||||
PARAM_METRIC_TYPE: Any(str, None),
|
||||
PARAM_METRIC_XPATH: Any(str, None),
|
||||
},
|
||||
)
|
||||
|
||||
DoesNotExistError: Type[DvcException] = OutputDoesNotExistError
|
||||
IsNotFileOrDirError: Type[DvcException] = OutputIsNotFileOrDirError
|
||||
IsStageFileError: Type[DvcException] = OutputIsStageFileError
|
||||
@@ -1417,7 +1408,6 @@ ARTIFACT_SCHEMA = {
|
||||
**CHECKSUMS_SCHEMA,
|
||||
**META_SCHEMA,
|
||||
Required(Output.PARAM_PATH): str,
|
||||
Output.PARAM_PLOT: bool,
|
||||
Output.PARAM_PERSIST: bool,
|
||||
Output.PARAM_CLOUD: CLOUD_SCHEMA,
|
||||
}
|
||||
@@ -1433,7 +1423,6 @@ SCHEMA = {
|
||||
**ARTIFACT_SCHEMA,
|
||||
**ANNOTATION_SCHEMA,
|
||||
Output.PARAM_CACHE: bool,
|
||||
Output.PARAM_METRIC: Output.METRIC_SCHEMA,
|
||||
Output.PARAM_REMOTE: str,
|
||||
Output.PARAM_PUSH: bool,
|
||||
Output.PARAM_FILES: [DIR_FILES_SCHEMA],
|
||||
|
||||
+20
-15
@@ -639,31 +639,36 @@ def test_repro_metrics_add_unchanged(tmp_dir, dvc, copy_script):
|
||||
assert len(stages) == 1
|
||||
assert stages[0] is not None
|
||||
|
||||
file1 = "file1"
|
||||
file1_stage = file1 + ".dvc"
|
||||
dvc.run(
|
||||
fname=file1_stage,
|
||||
outs_no_cache=[file1],
|
||||
outs_no_cache=["file1"],
|
||||
deps=["foo", "copy.py"],
|
||||
cmd=f"python copy.py foo {file1}",
|
||||
single_stage=True,
|
||||
cmd="python copy.py foo file1",
|
||||
name="copy",
|
||||
)
|
||||
|
||||
stages = dvc.reproduce(file1_stage)
|
||||
stages = dvc.reproduce("copy")
|
||||
assert len(stages) == 0
|
||||
|
||||
d = load_yaml(file1_stage)
|
||||
d["outs"][0]["metric"] = True
|
||||
dump_yaml(file1_stage, d)
|
||||
dvc.stage.add(
|
||||
metrics_no_cache=["file1"],
|
||||
deps=["foo", "copy.py"],
|
||||
cmd="python copy.py foo file1",
|
||||
name="copy",
|
||||
force=True,
|
||||
)
|
||||
|
||||
stages = dvc.reproduce(file1_stage)
|
||||
stages = dvc.reproduce("copy")
|
||||
assert len(stages) == 0
|
||||
|
||||
d = load_yaml(file1_stage)
|
||||
d["outs"][0]["metric"] = False
|
||||
dump_yaml(file1_stage, d)
|
||||
dvc.stage.add(
|
||||
outs_no_cache=["file1"],
|
||||
deps=["foo", "copy.py"],
|
||||
cmd="python copy.py foo file1",
|
||||
name="copy",
|
||||
force=True,
|
||||
)
|
||||
|
||||
stages = dvc.reproduce(file1_stage)
|
||||
stages = dvc.reproduce("copy")
|
||||
assert len(stages) == 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user