-
Notifications
You must be signed in to change notification settings - Fork 0
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
137 update generic reports with irv winners #185
Conversation
…lots. Included in .csv.
…om IRV contests in StateReport summary.
…e-generic-reports-with-irv-winners
@@ -269,4 +284,63 @@ public static long custCopyOut(final String sql, OutputStream to, CopyManager cm | |||
} | |||
} | |||
|
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.
In the first sentence of the comment, clarify that the ContestResult structure does not have the correct values for those quantities for IRV.
if(ca instanceof IRVComparisonAudit) { | ||
final Set<String> choices = new HashSet<>(); | ||
// Get the choices for the contest. These should be the same for all the contests, but | ||
// gather the whole set from all of them just in case. |
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.
Would it make sense to iterate over final Contest contest? It looks like line 309 is updating the choices set defined on line 304, yet choices has been defined final. (I think the rules are a bit weird/counter intuitive when objects are made final).
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.
Yes it's updating the object, but it's not reassigning the value, so 'final' is OK.
cell.setCellValue(choice); | ||
// County-level results really don't make sense for IRV. Therefore print a | ||
// very brief summary and a reference to the assertions csv. | ||
for (final CountyContestResult ccr : e.getValue().drivingContestResults()) { | ||
|
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.
Could status be final? I'm not entirely sure whether it is updated later.
* @param standard_right_style " | ||
* @return a CellStatus record, which tells the ensuing generation function which row it is up to | ||
* and what maximum cell number has been used. | ||
*/ |
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.
Consider what input arguments could be final.
-- covers the contest in question, | ||
-- original cvr info, audit board interp info. | ||
-- note that the random sequence index (includes dupes) is contest_audit_info.index | ||
-- cvr_contest_info.index is the index of the *contest* on the ballot | ||
-- Note that in case of an overvote, `cci_a.choices` shows all the choices the Audit Board thought the voter intended, while cci.choices will *not* show all those choices. | ||
-- Note that in case of an overvote, `cci_a.choices` shows all the choices the Audit Board thought the voter intended, while cci.choices will *not* show all those choices. | ||
|
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.
Is this TODO ours or CDOS IT's?
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.
That was already there!
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.
(And I think it probably is properly handled, because at least some PHANTOM_BALLOT items show up in this report.)
This does not yet have tests, because it's not obvious to me how we write good tests for all these reports, but I've added a card to the project for those tests.