diff --git a/src/cli/module.py b/src/cli/module.py index 8f0e6d6..e1ed08d 100644 --- a/src/cli/module.py +++ b/src/cli/module.py @@ -32,7 +32,18 @@ class Match: self.teams = teams def validate_config(self): - return True + if self.config == None: + return "config cannot be empty" + elif self.apikey == None or self.apikey == "": + return "apikey cannot be empty" + elif self.tbakey == None or self.tbakey == "": + return "tbakey cannot be empty" + elif not(self.config["scope"] in ["competition", "season", "none"]): + return "scope must be one of: (competition, season, none)" + elif not(self.config["agglomeration"] in ["none", "mean"]): + return "agglomeration must be one of: (none, mean)" + else: + return None def load_data(self): pass