cache: rename .dvc/cache/run to .dvc/cache/runs (#3732)

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.
This commit is contained in:
Ruslan Kuprieiev
2020-05-04 13:26:52 +03:00
committed by GitHub
parent 2dda540db6
commit b2ea279c9e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -1295,7 +1295,7 @@ class TestReproNoCommit(TestRepro):
["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):