Skip to content

Commit f30e220

Browse files
committed
Update voting script for June 2025 meeting
1 parent 819b273 commit f30e220

File tree

1 file changed

+8
-27
lines changed

1 file changed

+8
-27
lines changed

utils/generate_vote_emails.py

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,19 @@
1515
# If modifying these scopes, delete the file token.pickle.
1616
SCOPES = ["https://www.googleapis.com/auth/forms.body", "https://www.googleapis.com/auth/gmail.send"]
1717

18-
prev_attendance_file_2 = "/Users/wbland/mpi/mpi-forum.github.io/_data/meetings/2024/12/attendance.csv"
19-
prev_attendance_file_1 = "/Users/wbland/mpi/mpi-forum.github.io/_data/meetings/2025/01/attendance.csv"
20-
curr_attendance_file = "/Users/wbland/mpi/mpi-forum.github.io/_data/meetings/2025/03/attendance.csv"
21-
curr_registration_file = "/Users/wbland/mpi/meeting-details/2025-03-mar/2025-03-05-registration.csv"
18+
prev_attendance_file_2 = "/Users/wbland/mpi/mpi-forum.github.io/_data/meetings/2025/01/attendance.csv"
19+
prev_attendance_file_1 = "/Users/wbland/mpi/mpi-forum.github.io/_data/meetings/2025/03/attendance.csv"
20+
curr_attendance_file = "/Users/wbland/mpi/mpi-forum.github.io/_data/meetings/2025/06/attendance.csv"
21+
curr_registration_file = "/Users/wbland/mpi/meeting-details/2025-06-jun/2025-06-04-registration.csv"
2222
transition_orgs_file = "/Users/wbland/mpi/mpi-forum.github.io/_data/orgs.csv"
2323
# Make sure to use a pre-filled link here so it gets email out correctly
24-
voting_link = "https://docs.google.com/forms/d/e/1FAIpQLScM-VNnSFYcxZ1pbnhHSonWiTWYhPok-bPgdsNtZTXBgSdoKw/viewform?usp=pp_url&entry.1133723442={name}&entry.645559303={org}&entry.1376511413={id}"
24+
voting_link = "https://docs.google.com/forms/d/e/1FAIpQLSeaS0ppyW9BVbFt57nb__0Q2mrrdeRobFJg6Ouk0uW_BztffQ/viewform?usp=pp_url&entry.661715895={name}&entry.795178664={org}&entry.535119709={id}"
2525

26-
vote_name = "March 2025 Day 1"
27-
closing_time = "2:00pm on March 05, 2025"
28-
time_zone = "Central European Time (UTC +1)"
26+
vote_name = "June 2025 Day 1"
27+
closing_time = "12:30pm on June 04, 2025"
28+
time_zone = "US Central Time (UTC - 4)"
2929
subject_string = vote_name + " Voting Link"
3030

31-
prev_ooe = 30
3231
dry_run = 1
3332

3433
from email import encoders
@@ -145,10 +144,6 @@ def main():
145144
keyring.get_keyring()
146145
service = GmailSMTP()
147146

148-
ooe = 0;
149-
imove = 0;
150-
registered = 0;
151-
152147
prev_attendees_1 = list(csv.DictReader(open(prev_attendance_file_1)));
153148
prev_attendees_2 = list(csv.DictReader(open(prev_attendance_file_2)));
154149
curr_attendees = list(csv.DictReader(open(curr_attendance_file)));
@@ -194,12 +189,10 @@ def main():
194189
if org == "Self (Non-voting participant)":
195190
continue
196191
elif org not in orgs:
197-
registered = registered + 1;
198192
orgs[org] = {'registered': 1, 'attended': normalize_curr_attendance(int(row['attend'])), 'prev_1': 0, 'prev_2': 0,
199193
'attend_curr': int(row['attend']), 'register_curr': 1};
200194
elif (orgs[org]['register_curr'] == 0 or orgs[org]['attend_curr'] == 0):
201195
if orgs[org]['register_curr'] == 0:
202-
registered = registered + 1;
203196
orgs[org]['registered'] = int(orgs[org]['registered']) + 1;
204197
orgs[org]['attended'] = int(orgs[org]['attended']) + normalize_curr_attendance(int(row['attend']));
205198
orgs[org]['attend_curr'] = normalize_curr_attendance(int(row['attend'])) or orgs[org]['attend_curr'];
@@ -216,23 +209,14 @@ def main():
216209
no_attend.append(org);
217210
elif orgs[org]['attend_curr'] != 1:
218211
no_curr.append(org);
219-
ooe = ooe + 1;
220212
else:
221213
eligible.append(org);
222-
ooe = ooe + 1;
223-
imove = imove + 1;
224214

225215
no_register.sort();
226216
no_attend.sort();
227217
no_curr.sort();
228218
eligible.sort();
229219

230-
print("REGISTERED ORGS: " + str(registered));
231-
print("OOE ORGS: " + str(ooe));
232-
print("IMOVE ORGS: " + str(imove));
233-
print("INDIVIDUAL BALLOT QUORUM: " + str(math.ceil(imove * 0.75)));
234-
print("NEEDED FOR MEETING QUORUM: " + str(math.ceil(prev_ooe * 2.0/3.0)));
235-
236220
print("\n=== Eligible to vote ===\n");
237221
with open('ooe_orgs.csv', 'w', newline='') as csvfile:
238222
writer = csv.DictWriter(csvfile, fieldnames=['org_name']);
@@ -249,9 +233,6 @@ def main():
249233
print(*no_attend, sep = '\n');
250234
print("\n===\n");
251235

252-
if (imove < (prev_ooe * 2.0 / 3.0)):
253-
print("Did not meet meeting quorum. IMOVE required: " + str(prev_ooe * 2.0 / 3.0) + "\n");
254-
255236
for row in iter(curr_registration):
256237
org = row["org"]
257238
if org == "Self (Non-voting participant)":

0 commit comments

Comments
 (0)