From 71b850719cea50b9d983ecd5116b3400162288b4 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 4 May 2020 12:55:48 +0300 Subject: [PATCH] cache: rename `.dvc/cache/run` to `.dvc/cache/runs` To be consistent with how git does it (e.g. objects) as well as with future cache structure where we plan on adding `dirs`/`files`/`objects` subdirs in the future. --- dvc/stage/cache.py | 2 +- tests/func/test_repro.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/stage/cache.py b/dvc/stage/cache.py index cdfc6ff637..b8e7ab2436 100644 --- a/dvc/stage/cache.py +++ b/dvc/stage/cache.py @@ -37,7 +37,7 @@ def _get_stage_hash(stage): class StageCache: def __init__(self, cache_dir): - self.cache_dir = os.path.join(cache_dir, "run") + self.cache_dir = os.path.join(cache_dir, "runs") def _get_cache_dir(self, key): return os.path.join(self.cache_dir, key[:2], key) diff --git a/tests/func/test_repro.py b/tests/func/test_repro.py index 4210826109..b7ce68eafb 100644 --- a/tests/func/test_repro.py +++ b/tests/func/test_repro.py @@ -1295,7 +1295,7 @@ def test(self): ["repro", self._get_stage_target(self.stage), "--no-commit"] ) self.assertEqual(ret, 0) - self.assertEqual(os.listdir(self.dvc.cache.local.cache_dir), ["run"]) + self.assertEqual(os.listdir(self.dvc.cache.local.cache_dir), ["runs"]) class TestReproAlreadyCached(TestRepro):