diff --git a/src/nhl_model/ann.py b/src/nhl_model/ann.py index fd2a2da..c799ce2 100644 --- a/src/nhl_model/ann.py +++ b/src/nhl_model/ann.py @@ -249,7 +249,7 @@ def findGamesByDate(day, month, year): return None if "games" not in todaysGameData or len(todaysGameData["games"]) == 0: - logger.error(f"no games foud for today {searchDate}") + logger.error(f"no games found for today {searchDate}") return None return todaysGameData diff --git a/src/nhl_model/exec.py b/src/nhl_model/exec.py index 05c4957..460c98a 100644 --- a/src/nhl_model/exec.py +++ b/src/nhl_model/exec.py @@ -1,8 +1,8 @@ import argparse from datetime import datetime from logging import getLogger, basicConfig -from nhl_model.ann import execAnn, findFiles, execAnnSpecificDate -from nhl_model.dataset import generateDataset, pullDatasetNewAPI +from nhl_model.ann import execAnn, findFiles, execAnnSpecificDate, determineWinners +from nhl_model.dataset import generateDataset from nhl_model.poisson import execPoisson @@ -68,6 +68,10 @@ def main(): '-y', '--year', help='Year for prediction', default=datetime.now().year ) + mainSubParsers.add_parser( + 'analyze', help='Analyze the output file and set the winner information.' + ) + args = parser.parse_args() # set the logger @@ -79,6 +83,8 @@ def main(): if args.execType == 'generate': validFiles = findFiles(args.version, args.startYear, args.endYear) generateDataset(args.version, args.startYear, args.endYear, validFiles=validFiles) + elif args.execType == 'analyze': + determineWinners() elif args.execType == 'ann': execAnn(args.override) elif args.execType == 'poisson':