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:
skshetry
2024-01-12 09:56:50 +05:45
committed by GitHub
parent d711ecda04
commit b46bd9ca65
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -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
View File
@@ -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 = {