diff --git a/dvc/dvcfile.py b/dvc/dvcfile.py index 3e8f6b0ae4..64a74eac01 100644 --- a/dvc/dvcfile.py +++ b/dvc/dvcfile.py @@ -27,8 +27,8 @@ DVC_FILE = "Dvcfile" DVC_FILE_SUFFIX = ".dvc" -PIPELINE_FILE = "pipelines.yaml" -PIPELINE_LOCK = "pipelines.lock" +PIPELINE_FILE = "dvc.yaml" +PIPELINE_LOCK = "dvc.lock" class LockfileCorruptedError(DvcException): diff --git a/tests/func/test_data_cloud.py b/tests/func/test_data_cloud.py index d3d1d47ac0..a9336edee3 100644 --- a/tests/func/test_data_cloud.py +++ b/tests/func/test_data_cloud.py @@ -828,22 +828,22 @@ def test_pipeline_file_target_ops(tmp_dir, dvc, local_remote, run_copy): assert len(recurse_list_dir(fspath_py35(local_remote))) == 3 clean(outs, dvc) - assert set(dvc.pull(["pipelines.yaml"])["added"]) == {"lorem2", "baz"} + assert set(dvc.pull(["dvc.yaml"])["added"]) == {"lorem2", "baz"} clean(outs, dvc) assert set(dvc.pull()["added"]) == set(outs) # clean everything in remote and push clean(local_remote.iterdir()) - dvc.push(["pipelines.yaml:copy-ipsum-baz"]) + dvc.push(["dvc.yaml:copy-ipsum-baz"]) assert len(recurse_list_dir(fspath_py35(local_remote))) == 1 clean(local_remote.iterdir()) - dvc.push(["pipelines.yaml"]) + dvc.push(["dvc.yaml"]) assert len(recurse_list_dir(fspath_py35(local_remote))) == 2 with pytest.raises(StageNotFound): - dvc.push(["pipelines.yaml:StageThatDoesNotExist"]) + dvc.push(["dvc.yaml:StageThatDoesNotExist"]) with pytest.raises(StageNotFound): - dvc.pull(["pipelines.yaml:StageThatDoesNotExist"]) + dvc.pull(["dvc.yaml:StageThatDoesNotExist"]) diff --git a/tests/func/test_pipeline.py b/tests/func/test_pipeline.py index f9c43f2aa6..6da16f7b7b 100644 --- a/tests/func/test_pipeline.py +++ b/tests/func/test_pipeline.py @@ -278,20 +278,20 @@ def test_pipeline_list_show_multistage(tmp_dir, dvc, run_copy, caplog): with caplog.at_level(logging.INFO, "dvc"): command._show("foobar.dvc", False, False, False) output = caplog.text.splitlines() - assert "pipelines.yaml:copy-foo-bar" in output[0] + assert "dvc.yaml:copy-foo-bar" in output[0] assert "foobar.dvc" in output[1] caplog.clear() with caplog.at_level(logging.INFO, "dvc"): - command._show("pipelines.yaml:copy-foo-bar", False, False, False) - assert "pipelines.yaml:copy-foo-bar" in caplog.text + command._show("dvc.yaml:copy-foo-bar", False, False, False) + assert "dvc.yaml:copy-foo-bar" in caplog.text assert "foobar.dvc" not in caplog.text command = CmdPipelineList([]) caplog.clear() with caplog.at_level(logging.INFO, "dvc"): command.run() - assert "pipelines.yaml:copy-foo-bar" in caplog.text + assert "dvc.yaml:copy-foo-bar" in caplog.text assert "foobar.dvc" in caplog.text assert "1 pipelines in total" @@ -302,10 +302,10 @@ def test_pipeline_ascii_multistage(tmp_dir, dvc, run_copy): run_copy("bar", "foobar") command = CmdPipelineShow([]) nodes, edges, is_tree = command._build_graph("foobar.dvc") - assert set(nodes) == {"pipelines.yaml:copy-foo-bar", "foobar.dvc"} + assert set(nodes) == {"dvc.yaml:copy-foo-bar", "foobar.dvc"} assert set(edges) == { - ("foobar.dvc", "pipelines.yaml:copy-foo-bar"), + ("foobar.dvc", "dvc.yaml:copy-foo-bar"), } - nodes, edges, is_tree = command._build_graph("pipelines.yaml:copy-foo-bar") - assert set(nodes) == {"pipelines.yaml:copy-foo-bar"} + nodes, edges, is_tree = command._build_graph("dvc.yaml:copy-foo-bar") + assert set(nodes) == {"dvc.yaml:copy-foo-bar"} diff --git a/tests/func/test_repo.py b/tests/func/test_repo.py index 20200cbd51..a178cfe198 100644 --- a/tests/func/test_repo.py +++ b/tests/func/test_repo.py @@ -86,13 +86,13 @@ def collect_outs(*args, **kwargs): "foobar", "foo", } - assert collect_outs("pipelines.yaml:copy-foo-foobar", recursive=True) == { + assert collect_outs("dvc.yaml:copy-foo-foobar", recursive=True) == { "foobar" } run_copy("foobar", "baz", name="copy-foobar-baz") - assert collect_outs("pipelines.yaml") == {"foobar", "baz"} - assert collect_outs("pipelines.yaml", with_deps=True) == { + assert collect_outs("dvc.yaml") == {"foobar", "baz"} + assert collect_outs("dvc.yaml", with_deps=True) == { "foobar", "baz", "foo", diff --git a/tests/func/test_stage.py b/tests/func/test_stage.py index c6a52b990a..711e76724e 100644 --- a/tests/func/test_stage.py +++ b/tests/func/test_stage.py @@ -200,7 +200,7 @@ def test_stage_addressing(tmp_dir, dvc, run_copy): assert stage1.addressing == "bar.dvc" stage2 = run_copy("bar", "baz", name="copy-bar-baz") - assert stage2.addressing == "pipelines.yaml:copy-bar-baz" + assert stage2.addressing == "dvc.yaml:copy-bar-baz" folder = tmp_dir / "dir" folder.mkdir() diff --git a/tests/func/test_status.py b/tests/func/test_status.py index b958d74013..1956fa7c99 100644 --- a/tests/func/test_status.py +++ b/tests/func/test_status.py @@ -74,12 +74,12 @@ def test_status_on_pipeline_stages(tmp_dir, dvc, run_copy): stage.cmd = " ".join(stage.cmd.split()) stage.dvcfile._dump_pipeline_file(stage) - assert dvc.status() == {"pipelines.yaml:copy-foo-bar": ["changed command"]} + assert dvc.status() == {"dvc.yaml:copy-foo-bar": ["changed command"]} # delete outputs (tmp_dir / "bar").unlink() assert dvc.status() == { - "pipelines.yaml:copy-foo-bar": [ + "dvc.yaml:copy-foo-bar": [ {"changed outs": {"bar": "deleted"}}, "changed command", ] @@ -87,7 +87,7 @@ def test_status_on_pipeline_stages(tmp_dir, dvc, run_copy): (tmp_dir / "foo").unlink() assert dvc.status() == { "foo.dvc": [{"changed outs": {"foo": "deleted"}}], - "pipelines.yaml:copy-foo-bar": [ + "dvc.yaml:copy-foo-bar": [ {"changed deps": {"foo": "deleted"}}, {"changed outs": {"bar": "deleted"}}, "changed command", diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py index 1d181f56dd..741da999b0 100644 --- a/tests/unit/utils/test_utils.py +++ b/tests/unit/utils/test_utils.py @@ -138,11 +138,11 @@ def test_resolve_output(inp, out, is_dir, expected, mocker): @pytest.mark.parametrize( "inp,out, default", [ - ["pipelines.yaml", ("pipelines.yaml", None), None], - ["pipelines.yaml:name", ("pipelines.yaml", "name"), None], - [":name", ("pipelines.yaml", "name"), None], + ["dvc.yaml", ("dvc.yaml", None), None], + ["dvc.yaml:name", ("dvc.yaml", "name"), None], + [":name", ("dvc.yaml", "name"), None], ["stage.dvc", ("stage.dvc", None), None], - ["pipelines.yaml:name", ("pipelines.yaml", "name"), None], + ["dvc.yaml:name", ("dvc.yaml", "name"), None], ["../models/stage.dvc", ("../models/stage.dvc", None), "def"], [":name", ("default", "name"), "default"], [":name", ("default", "name"), "default"], @@ -154,8 +154,8 @@ def test_parse_target(inp, out, default): def test_hint_on_lockfile(): with pytest.raises(Exception) as exc: - assert parse_target("pipelines.lock:name") - assert "pipelines.yaml:name" in str(exc.value) + assert parse_target("dvc.lock:name") + assert "dvc.yaml:name" in str(exc.value) @pytest.mark.parametrize(