diff --git a/dvc/api.py b/dvc/api.py index 7f963a4b1..42728229b 100644 --- a/dvc/api.py +++ b/dvc/api.py @@ -2,6 +2,7 @@ import importlib import os import sys from contextlib import contextmanager +from voluptuous import Schema try: @@ -16,6 +17,26 @@ from dvc.repo import Repo from dvc.external_repo import external_repo +summon_schema = Schema( + { + "objects": [ + { + "name": str, + "description": str, + "paper": str, + "metrics": dict, + "summon": { + "type": "python", + "call": str, + "args": dict, + "deps": [str] + }, + } + ], + } +) + + def get_url(path, repo=None, rev=None, remote=None): """Returns an url of a resource specified by path in repo""" with _make_repo(repo, rev=rev) as _repo: