modified config validation for Match module

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2021-10-21 21:51:14 +00:00
parent f40939d69d
commit de81a03e3d

View File

@ -36,7 +36,6 @@ class Match:
self.teams = teams
def validate_config(self):
return True, ""
"""
if self.config == None:
return False, "config cannot be empty"
@ -46,8 +45,10 @@ class Match:
return False, "tbakey cannot be empty"
elif not(self.config["scope"] in ["competition", "season", "none"]):
return False, "scope must be one of: (competition, season, none)"
elif not(self.config["agglomeration"] in ["none", "mean"]):
return False, "agglomeration must be one of: (none, mean)"
elif self.config["agglomeration"] != "none":
return False, "agglomeration must be 'none', there are currently no supported Agglomeration methods"
elif self.config["tests"] == None:
return False, "tests must not be None, it may be empty {}"
else:
return True, ""
"""