-
Notifications
You must be signed in to change notification settings - Fork 3
/
test.py
71 lines (55 loc) · 1.91 KB
/
test.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from datetime import datetime
from config_loader import load_config
from models.Player import Player
from utils.commons import GSHEET_WEEKLYPROMPT_COLUMN_APPROVED, GSHEET_WEEKLYPROMPT_COLUMN_PENDING_APPROVAL, GSHEET_WEEKLYPROMPT_COLUMN_REJECTED
from utils.utils import get_file_path, get_week_from_curr_datetime
from controller.excelHandler import get_weeklyprompts_from_gsheets, update_birthday_state_to_gsheets, update_weeklyprompt_state_to_gsheets
if __name__ == "__main__":
load_config('local')
print(
get_file_path("cred", "gsheets")
)
# print(
# update_birthday_state_to_gsheets(None)
# )
# player = Player(None)
# player.increment_score_at_week(2, 1)
# player.append_message_id_to_list_by_type(3434324324, "APPROVED")
# player.append_message_id_to_list_by_type(3434324325, "APPROVED")
# print(
# player.get_weekly_scores_from_encoding()
# )
# print(
# player.get_messages_id_lists_to_encoding()
# )
df = get_weeklyprompts_from_gsheets()
player = Player(df.iloc[1])
player.increment_weeklyprompt_score_at_week(2, 1)
player.increment_weeklyprompt_score_at_week(2, 1)
player.append_message_id_to_list_by_type(3434324324, GSHEET_WEEKLYPROMPT_COLUMN_APPROVED)
player.append_message_id_to_list_by_type(3434324325, GSHEET_WEEKLYPROMPT_COLUMN_APPROVED)
player.append_message_id_to_list_by_type(3434324327, GSHEET_WEEKLYPROMPT_COLUMN_PENDING_APPROVAL)
player.append_message_id_to_list_by_type(3434324328, GSHEET_WEEKLYPROMPT_COLUMN_REJECTED)
print(
player.get_weeklyprompt_scores_to_encoding()
)
print(
player.get_messages_id_lists_to_encoding()
)
print(
player.message_id_lists
)
print(
player.week_to_num_submitted_artworks
)
df_row = \
player.export_to_df_row()
df.iloc[1] = df_row
# print(df)
update_weeklyprompt_state_to_gsheets(df)
print("done")
# print(
# get_week_from_curr_datetime(
# datetime.today()
# )
# )