From 38e9b2ba95fa4b50868f971c2616a84e6877eb38 Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Sat, 21 Jan 2023 02:54:35 +0900 Subject: [PATCH] deps: bump dvc-data to 0.35.1 --- dvc/api/data.py | 2 +- pyproject.toml | 2 +- tests/func/test_ignore.py | 12 ++++++------ tests/func/test_state.py | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dvc/api/data.py b/dvc/api/data.py index a26885909..69b1423ce 100644 --- a/dvc/api/data.py +++ b/dvc/api/data.py @@ -27,7 +27,7 @@ def get_url(path, repo=None, rev=None, remote=None): if not dvc_info: raise OutputNotFoundError(path, repo) - dvc_repo = info["repo"] + dvc_repo = info["repo"] # pylint: disable=unsubscriptable-object md5 = dvc_info["md5"] return dvc_repo.cloud.get_url_for(remote, checksum=md5) diff --git a/pyproject.toml b/pyproject.toml index 2ac1478c5..d8028c2bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,7 +53,7 @@ dependencies = [ "dvc-render==0.0.17", "dvc-task==0.1.11", "dvclive>=1.2.2", - "dvc-data==0.35.0", + "dvc-data==0.35.1", "dvc-http", "hydra-core>=1.1.0", "iterative-telemetry==0.0.6", diff --git a/tests/func/test_ignore.py b/tests/func/test_ignore.py index 6d5c1f879..1842800b6 100644 --- a/tests/func/test_ignore.py +++ b/tests/func/test_ignore.py @@ -64,25 +64,25 @@ def test_walk(tmp_dir, dvc): assert result == [ ( str(tmp_dir), - {"dir": dvc.fs.info(tmp_dir / "dir")}, + {"dir": dvc.fs.info(str(tmp_dir / "dir"))}, { - "bar": dvc.fs.info(tmp_dir / "bar"), - ".dvcignore": dvc.fs.info(tmp_dir / ".dvcignore"), + "bar": dvc.fs.info(str(tmp_dir / "bar")), + ".dvcignore": dvc.fs.info(str(tmp_dir / ".dvcignore")), }, ), ( str(tmp_dir / "dir"), { - "subdir": dvc.fs.info(tmp_dir / "dir" / "subdir"), + "subdir": dvc.fs.info(str(tmp_dir / "dir" / "subdir")), }, { - "baz": dvc.fs.info(tmp_dir / "dir" / "baz"), + "baz": dvc.fs.info(str(tmp_dir / "dir" / "baz")), }, ), ( str(tmp_dir / "dir" / "subdir"), {}, - {"qux": dvc.fs.info(tmp_dir / "dir" / "subdir" / "qux")}, + {"qux": dvc.fs.info(str(tmp_dir / "dir" / "subdir" / "qux"))}, ), ] diff --git a/tests/func/test_state.py b/tests/func/test_state.py index 1e4f6ae6c..15d96db36 100644 --- a/tests/func/test_state.py +++ b/tests/func/test_state.py @@ -14,18 +14,18 @@ def test_state(tmp_dir, dvc): state = State(dvc.root_dir, dvc.tmp_dir, dvc.dvcignore) - state.save(path, dvc.fs, hash_info) - assert state.get(path, dvc.fs)[1] == hash_info + state.save(str(path), dvc.fs, hash_info) + assert state.get(str(path), dvc.fs)[1] == hash_info path.unlink() path.write_text("1") - assert state.get(path, dvc.fs) == (None, None) + assert state.get(str(path), dvc.fs) == (None, None) hash_info = HashInfo("md5", file_md5(path, dvc.fs)) - state.save(path, dvc.fs, hash_info) + state.save(str(path), dvc.fs, hash_info) - assert state.get(path, dvc.fs)[1] == hash_info + assert state.get(str(path), dvc.fs)[1] == hash_info def test_state_overflow(tmp_dir, dvc):