mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
top-level plot collections: fail on empty dict (#10233)
* top-level plot collections: skip empty dict * tighten schema for plots; require key name
This commit is contained in:
@@ -487,6 +487,7 @@ def _collect_pipeline_files(repo, targets: List[str], props, onerror=None):
|
||||
if isinstance(elem, str):
|
||||
dvcfile_defs_dict[elem] = None
|
||||
else:
|
||||
assert elem
|
||||
k, v = next(iter(elem.items()))
|
||||
dvcfile_defs_dict[k] = v
|
||||
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ PLOT_DEFINITION = {
|
||||
Output.PARAM_PLOT_TITLE: str,
|
||||
Output.PARAM_PLOT_TEMPLATE: str,
|
||||
}
|
||||
SINGLE_PLOT_SCHEMA = {str: vol.Any(PLOT_DEFINITION, None)}
|
||||
SINGLE_PLOT_SCHEMA = {vol.Required(str): vol.Any(PLOT_DEFINITION, None)}
|
||||
ARTIFACTS = "artifacts"
|
||||
SINGLE_ARTIFACT_SCHEMA = vol.Schema({str: ARTIFACT_SCHEMA})
|
||||
FOREACH_IN = {
|
||||
|
||||
Reference in New Issue
Block a user