From: Benjamin Mako Hill Date: Tue, 10 Nov 2020 18:20:43 +0000 (-0800) Subject: don't count folks who were missing X-Git-Url: https://code.communitydata.science/coldcallbot-discord.git/commitdiff_plain/4676d0b0c334c78d8333f387a61d2f015bbc083e?ds=inline;hp=61d6ecd88a2207059fc7832d80e4e2bc7f43c13d don't count folks who were missing Patch the coldcall script so that it doesn't count folks who are missing as present for a question. --- diff --git a/coldcall.py b/coldcall.py index 4987c74..1905844 100644 --- a/coldcall.py +++ b/coldcall.py @@ -28,7 +28,8 @@ class ColdCall(): if re.match("call_list-\d{4}-\d{2}-\d{2}.tsv", fn): with open(f"./data/{fn}", 'r') as f: for row in DictReader(f, delimiter="\t"): - previous_questions[row["discord_name"]] += 1 + if not row["answered"] == "FALSE": + previous_questions[row["discord_name"]] += 1 return previous_questions @@ -100,7 +101,7 @@ class ColdCall(): # cc = ColdCall() -# test_student_list = ["jordan", "Kristen Larrick", "Madison Heisterman", "Maria.Au20", "Laura (Alia) Levi", "Leona Aklipi", "Linya Feng", "anne", "kirst", "emmaaitelli", "ashleylee", "allie_partridge", "Tiana_Cole", "Hamin", "Ella Qu", "Angel Su", "Shizuka", "Ben Baird", "Kim Do", "Isaacm24", "Sam Bell", "Courtneylg", "TasnimHasan"] +# test_student_list = ["jordan", "Kristen Larrick", "Madison Heisterman", "Maria.Au20", "Laura (Alia) Levi", "Leona Aklipi", "anne", "emmaaitelli", "ashleylee", "allie_partridge", "Tiana_Cole", "Hamin", "Ella Qu", "Shizuka", "Ben Baird", "Kim Do", "Isaacm24", "Sam Bell", "Courtneylg"] # print(cc.coldcall(test_student_list)) # test_student_list = ["jordan", "Kristen Larrick", "Mako"]