Skip to content

Commit

Permalink
Feature/milestone4 (#115)
Browse files Browse the repository at this point in the history
* verify_ballot print bug

* testing with a more real upstream

* consistency
  • Loading branch information
windoverwater authored May 1, 2024
1 parent 6904be0 commit a820e5c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ else
endif

# Let there be no default target
.PHONY: default
default:
.PHONY: help
help:
@echo "${RED}There is no default make target.${END} Specify one of:"
@echo "poetry-build - performs a poetry local install"
@echo "poetry-link - refreshes local (poetry file) symlinks"
Expand Down
4 changes: 1 addition & 3 deletions src/vtp/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ class Globals:
# The election date-time for all ElectionData commits
"ELECTION_DATETIME": "2024-11-05T12:00:00",
# The arbitrary election data string
# "ELECTION_UPSTREAM_REMOTE": "https://github.com/TrustTheVote-Project/"
# + "VTP-mock-election.US.16",
"ELECTION_UPSTREAM_REMOTE": "http://127.0.0.1:8000/static",
"ELECTION_UPSTREAM_REMOTE": "https://github.com/TrustTheVote-Project/",
}

@staticmethod
Expand Down
19 changes: 12 additions & 7 deletions src/vtp/ops/verify_ballot_receipt_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,19 @@ def vet_a_row():
if found is False:
unmerged_uids[uid] = u_count
if unmerged_uids:
truly_unmerged_uids = {}
for uid in unmerged_uids:
if uid not in error_digests:
truly_unmerged_uids[uid] = unmerged_uids[uid]
truly_unmerged_uids = {
uid: dig
for uid, dig in unmerged_uids.items()
if uid not in error_digests
}
if truly_unmerged_uids:
self.imprimir("The following contests are not merged to main yet:", 0)
self.imprimir(
"The following contests are not merged to main yet:", 0
)
for uid, offset in truly_unmerged_uids.items():
self.imprimir(f"{headers[offset]} ({requested_digests[offset]})", 0)
self.imprimir(
f"{headers[offset]} ({requested_digests[offset]})", 0
)

# If a row is specified, will print the context index in the
# actual contest tally - which basically tells the voter 'your
Expand Down Expand Up @@ -301,7 +306,7 @@ def vet_a_row():
self.imprimir_formatting("begin_error_box")
self.imprimir(
f"ballot {thing} INVALID - the supplied ballot receipt has "
"{len(error_digests)} errors.",
f"{len(error_digests)} errors.",
1,
)
self.imprimir_formatting("end_error_box")
Expand Down

0 comments on commit a820e5c

Please sign in to comment.