Skip to content
Snippets Groups Projects
Commit 7a88b086 authored by James Johnson's avatar James Johnson
Browse files

Kpi check added to verifier

parent dd052776
No related branches found
No related tags found
1 merge request!163Verifier Additions
......@@ -9,6 +9,7 @@ class VerifierError(HasStrictTraits):
error = Str()
def verify_workflow(workflow):
"""Verifies if the workflow can be executed, and specifies where the
error occurs and why.
......@@ -45,6 +46,14 @@ def _check_mco(workflow):
if len(param.type.strip()) == 0:
errors.append(VerifierError(subject=param,
error="Parameter has empty type"))
for kpi in mco.kpis:
if len(kpi.name.strip()) == 0:
errors.append(VerifierError(subject=kpi,
error="Kpi has empty name"))
if len(kpi.objective.strip()) == 0:
errors.append(VerifierError(subject=kpi,
error="Kpi objective is not set"))
return errors
......@@ -72,7 +81,6 @@ def _check_execution_layers(workflow):
return errors
def _check_data_source(data_source_model):
errors = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment