-
Notifications
You must be signed in to change notification settings - Fork 28
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
Create shared summaryData function for tabulators #771
Conversation
245129f
to
b956f6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I do think however that simple stats should stay in the backend. We're assuming here that bettervoting will always be the UI but there might be other clients (discord bots for example) that might want those stats without having to rewrite the same frontend code to calculate it. We can debate that later though.
Also would be a good idea to check the before and after of a few elections (like DSA) to verify that the new tabulator code is producing the same results. |
Sounds good, I'm happy to talk about that further
Good idea, I verified all the pres24 races and one of the dsa races before merging. Everything matched |
Description
New things in this PR
It also removes some features from the backend. In general I think the tabulators should only focus on what's necessary to generate the results. Anything related to deeper analysis can be left to the frontend widgets. Examples include counting bullet votes, and the equal preferences.
This also hard codes random tiebreakers for some of the tabulators. The backend should always do the full tiebreaker flow, and then the frontend can obscure the final random steps if the user prefers for the race to be reported as a true tie. That said there will be more tie breaker updates in a future PR