fix logical errors caused by breaking the assumption that there
authorJacob Lifshay <programmerjake@gmail.com>
Thu, 23 Sep 2021 02:23:58 +0000 (19:23 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 23 Sep 2021 02:23:58 +0000 (19:23 -0700)
will be at most one payment per person-bug combination.

split "donated" out into separate user from lkcl

budget-sync-config.toml
src/budget_sync/budget_graph.py

index 3f3c0b7905208e939ec5941db30c6109d63e96bd..dbbdd680e257a5c7efe5572ad6f9b186aa58cf81 100644 (file)
@@ -7,9 +7,16 @@ output_markdown_file = "programmerjake.mdwn"
 
 [people."Luke Kenneth Casson Leighton"]
 email = "lkcl@lkcl.net"
-aliases = ["lkcl", "donated", "luke", "Luke", "Luke Leighton"]
+aliases = ["lkcl", "luke", "Luke", "Luke Leighton"]
 output_markdown_file = "lkcl.mdwn"
 
+# for "donated" user, since budget-sync logically
+# depends on each person being paid at most once per bug
+[people."Luke Kenneth Casson Leighton (donated)"]
+email = "donated@lkcl.net"
+aliases = ["donated"]
+output_markdown_file = "lkcl-donated.mdwn"
+
 [people."NLnet 2019-10P"]
 email = "2019-10P@nlnet.nl"
 aliases = []
index e2824ee30ea4dc70589a610a1cdb74df46692fe0..bfc1d1fbb2dd009345c87f478e1d2a9057369d91 100644 (file)
@@ -654,8 +654,9 @@ class BudgetGraph:
                 payment.payee
                 previous_payment = payee_payments.get(payment.payee)
                 if previous_payment is not None:
-                    # NOT AN ERROR
-                    print("NOT AN ERROR", BudgetGraphDuplicatePayeesForTask(
+                    # is an error because budget-sync depends on there
+                    # being at most 1 payment per person-bug combination
+                    errors.append(BudgetGraphDuplicatePayeesForTask(
                         node.bug.id, root.bug.id,
                         previous_payment[-1].payee_key, payment.payee_key))
                     payee_payments[payment.payee].append(payment)