Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop assuming all upperclassmen are on every packet #294

Open
mxmeinhold opened this issue Sep 2, 2021 · 0 comments
Open

Stop assuming all upperclassmen are on every packet #294

mxmeinhold opened this issue Sep 2, 2021 · 0 comments

Comments

@mxmeinhold
Copy link
Collaborator

This line makes the assumption that every single upperclassman is a required signature on every packet. This may not be the case, due to e.g. changes in membership state that don't influence earlier packets. This results in a confusing list of signature counts when an upperclassman is required on only some of the packets, since they are listed as $num_signed / $num_total in the active section. This aught to be $num_signed / $num_can_sign_as_upper

{{ signed_count }}/{{ num_open_packets }}

This will probably require injecting more data into the upperclassmen dict here so that it's accessible in the template.

# Sum up the signed packets per upperclassman
upperclassmen = dict()
misc = dict()
for packet in open_packets:
for sig in packet.upper_signatures:
if sig.member not in upperclassmen:
upperclassmen[sig.member] = 0
if sig.signed:
upperclassmen[sig.member] += 1
for sig in packet.misc_signatures:
misc[sig.member] = 1 + misc.get(sig.member, 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant