def _filter_missing(repo, paths): repo_tree = RepoTree(repo, stream=True) for path in paths: metadata = repo_tree.metadata(path) if metadata.is_dvc: out = metadata.outs[0] if out.status()[str(out)] == "not in cache": yield path
def _filter_missing(repo, paths): repo_tree = RepoTree(repo, stream=True) for path in paths: try: metadata = repo_tree.metadata(path) if metadata.is_dvc: out = metadata.outs[0] if out.status().get(str(out)) == "not in cache": yield path except FileNotFoundError: pass
def _targets_to_path_infos(repo, targets): path_infos = [] missing = [] repo_tree = RepoTree(repo, stream=True) for target in targets: if repo_tree.exists(target): path_infos.append(repo_tree.metadata(target).path_info) else: missing.append(target) return path_infos, missing