dvc: separate data and objects

Initial simple separation to get the process of extracting dvc-objects
and dvc-data packages out of dvc.

dvc-objects is for:
 * defining base Object (aka HashFile) and ObjectDB
 * providing tools to work with those objects (check/transfer/etc)
 * etc

dvc-data is for:
 * defining higher level objects (e.g. Tree)
 * bulding objects from the workspace (aka staging)
 * projecting objects back into the workspace (aka checkout)
 * comparing Tree objects (aka diff)
 * defining misc object databases (e.g LocalObjectDB)
 * higher-level transfer (e.g. with Tree indexes)
 * etc

For example, the objects we use in run-cache are based on dvc-objects
and not on dvc-data, as they have absolutely nothing to do with data
management.

There are still some mixups in the code that will be addressed in the
followups.
This commit is contained in:
Ruslan Kuprieiev
2022-01-11 00:47:38 +02:00
parent 92f714e5ca
commit f64018b75e
52 changed files with 124 additions and 126 deletions
+2 -2
View File
@@ -3,9 +3,9 @@ from unittest.mock import ANY, patch
from scmrepo.git import Git
from dvc.data.stage import stage
from dvc.data.transfer import transfer
from dvc.external_repo import CLONES, external_repo
from dvc.objects.stage import stage
from dvc.objects.transfer import transfer
from dvc.utils import relpath
from dvc.utils.fs import makedirs, remove
from tests.unit.fs.test_repo import make_subrepo