Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index: data: support imports #9181

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dvc/dependency/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,18 @@ class RepoDependency(Dependency):
}

def __init__(self, def_repo: Dict[str, str], stage: "Stage", *args, **kwargs):
from dvc.fs import DVCFileSystem

self.def_repo = def_repo
self._objs: Dict[str, "HashFile"] = {}
self._meta: Dict[str, "Meta"] = {}
super().__init__(stage, *args, **kwargs)

self.fs = DVCFileSystem(
self.def_repo[self.PARAM_URL],
rev=self.def_repo.get(self.PARAM_REV_LOCK),
)

def _parse_path(self, fs, fs_path): # noqa: ARG002
return None

Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _load_storage_from_out(storage_map, key, out):
except NoRemoteError:
pass

if out.stage.is_import and not out.stage.is_repo_import:
if out.stage.is_import:
dep = out.stage.deps[0]
storage_map.add_data(FileStorage(key, dep.fs, dep.fs_path))

Expand Down