From 7b6e71a7f8472fb3714322a31cec5dd6e4b59426 Mon Sep 17 00:00:00 2001 From: Sandy Currier Date: Fri, 19 Apr 2024 03:47:11 -0400 Subject: [PATCH 1/3] verify_ballot print bug --- src/vtp/ops/verify_ballot_receipt_operation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vtp/ops/verify_ballot_receipt_operation.py b/src/vtp/ops/verify_ballot_receipt_operation.py index 2c19221..608c4ef 100644 --- a/src/vtp/ops/verify_ballot_receipt_operation.py +++ b/src/vtp/ops/verify_ballot_receipt_operation.py @@ -301,7 +301,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") From f3b88017c128f6275b1cc17fc92c47466dfe8a6f Mon Sep 17 00:00:00 2001 From: Sandy Currier Date: Sat, 20 Apr 2024 07:36:34 -0400 Subject: [PATCH 2/3] testing with a more real upstream --- src/vtp/core/common.py | 4 +--- src/vtp/ops/verify_ballot_receipt_operation.py | 17 +++++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/vtp/core/common.py b/src/vtp/core/common.py index d51a191..11b8ab2 100644 --- a/src/vtp/core/common.py +++ b/src/vtp/core/common.py @@ -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 diff --git a/src/vtp/ops/verify_ballot_receipt_operation.py b/src/vtp/ops/verify_ballot_receipt_operation.py index 608c4ef..c238b98 100644 --- a/src/vtp/ops/verify_ballot_receipt_operation.py +++ b/src/vtp/ops/verify_ballot_receipt_operation.py @@ -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 From f64c340fc223b4d80c80c67aae4a75a9427e8f82 Mon Sep 17 00:00:00 2001 From: Sandy Currier Date: Wed, 24 Apr 2024 20:49:30 -0400 Subject: [PATCH 3/3] consistency --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e463256..c0a8e3e 100644 --- a/Makefile +++ b/Makefile @@ -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"