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

137 update generic reports with irv winners #185

Merged
merged 21 commits into from
Aug 16, 2024

Conversation

vteague
Copy link
Member

@vteague vteague commented Aug 16, 2024

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.

@@ -269,4 +284,63 @@ public static long custCopyOut(final String sql, OutputStream to, CopyManager cm
}
}

Copy link
Member

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.
Copy link
Member

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).

Copy link
Member Author

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()) {

Copy link
Member

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.
*/
Copy link
Member

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.

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was already there!

Copy link
Member Author

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.)

@vteague vteague merged commit 7235fc9 into main Aug 16, 2024
1 check passed
@vteague vteague deleted the 137-update-generic-reports-with-irv-winners branch August 16, 2024 06:23
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

Successfully merging this pull request may close these issues.

Update generic reports with IRV winners; integrate IRV into existing reports
2 participants