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

Improve handling of problematic ballots #68

Open
carlschroedl opened this issue Mar 16, 2018 · 0 comments
Open

Improve handling of problematic ballots #68

carlschroedl opened this issue Mar 16, 2018 · 0 comments

Comments

@carlschroedl
Copy link
Member

As a user of the RankedPairsCalculator I want clear feedback about problems from incomplete or invalid ballots (rather than silent failures or cryptic error messages) so that I can quickly diagnose and fix problematic ballots.

An incomplete ballot is one which does not rank all candidates in the election This could be anything from the omission of all candidates tied for last, or the omission of a candidate from the middle of the order ex. 1,2,3,5,6.

An invalid ballot is one which has multiple candidates with the same id, or candidates which are not in this election.

This issue may involve adding a "problemBallots" field to a Results object. Alternatively it could involve throwing a custom Exception. This issue may involve adding a 'force' boolean which would allow a user to compute the election result without considering the problematic ballots.

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

No branches or pull requests

1 participant