dvc: implement multistage dvcfile (#3676)

* dvc: use lockfile as yaml instead of json

* refactor Dvcfile into Pipeline file and Single stage file

* fix tests

* dvc: fix outputs

* add more tests for collection of outputs

* add tests for data cloud/get/import/ls

* tests: test for checkouts

* Allow other checksums other than md5

* tests: use iterdir instead of os.listdir

* cleanup errors reported by cc and ds

* utils: throw DvcException instead of plain Exception

* tests: use yaml.load instead of json.load

* run: split assignments

* Update dvc/stage/exceptions.py

Co-authored-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Saugat Pachhai
2020-04-28 13:36:05 +03:00
committed by GitHub
co-authored by Ruslan Kuprieiev
parent e03128a8de
commit 1937527249
44 changed files with 1170 additions and 674 deletions
+3 -2
View File
@@ -38,13 +38,14 @@ def test_commit_force(tmp_dir, dvc):
assert dvc.status([stage.path]) == {}
def test_commit_with_deps(tmp_dir, dvc, run_copy):
@pytest.mark.parametrize("run_kw", [{}, {"name": "copy"}])
def test_commit_with_deps(tmp_dir, dvc, run_copy, run_kw):
tmp_dir.gen("foo", "foo")
(foo_stage,) = dvc.add("foo", no_commit=True)
assert foo_stage is not None
assert len(foo_stage.outs) == 1
stage = run_copy("foo", "file", no_commit=True)
stage = run_copy("foo", "file", no_commit=True, **run_kw)
assert stage is not None
assert len(stage.outs) == 1