Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dvc/dvcfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
10 changes: 5 additions & 5 deletions tests/func/test_data_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
16 changes: 8 additions & 8 deletions tests/func/test_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"}
6 changes: 3 additions & 3 deletions tests/func/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/func/test_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions tests/func/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ 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",
]
}
(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",
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/utils/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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(
Expand Down