mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
summon: define yaml file schema
This commit is contained in:
+21
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user