-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
executable file
·35 lines (27 loc) · 1018 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
"""Summary: Main file which contains an interactive tool."""
from config import *
from utils import update, seasonValid
from models import *
from plot import plot
def interactive():
"""Allows for interaction via command line"""
while True:
try:
season = int(raw_input("Input the season up to which you wish to generate a report: "))
if season <= 0:
print("Please enter a positive integer, try again...")
else:
if seasonValid(season):
break
else:
print("The season you selected does not exist yet, select a smaller number...")
except ValueError:
print("This is not a whole number, try again...")
seasons = range(1, season + 1)
print("Checking if all data is already downloaded...")
update(seasons=seasons)
print("Now generating plots...")
plot(finalSeason=season)
if __name__ == "__main__":
interactive()