You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@steve.apache.org by gs...@apache.org on 2026/02/27 13:41:28 UTC

(steve) branch trunk updated (a91c55d -> b6a2785)

This is an automated email from the ASF dual-hosted git repository.

gstein pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git


    from a91c55d  add endpoint for issue support documents
     new 59c9917  feat: add get_voters_for_email method and include name in voting persons query
     new b6a2785  refactor: return voter records as EasyDict objects in get_voters_for_email

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 v3/queries.yaml      | 2 +-
 v3/steve/election.py | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)


(steve) 01/02: feat: add get_voters_for_email method and include name in voting persons query

Posted by gs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git

commit 59c991776e2f3389cebc40083d04cb33c8b57364
Author: Greg Stein <gs...@gmail.com>
AuthorDate: Fri Feb 27 07:39:07 2026 -0600

    feat: add get_voters_for_email method and include name in voting persons query
    
    Co-authored-by: aider (openrouter/x-ai/grok-code-fast-1) <ai...@aider.chat>
---
 v3/queries.yaml      | 2 +-
 v3/steve/election.py | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/v3/queries.yaml b/v3/queries.yaml
index 6999590..ae72220 100644
--- a/v3/queries.yaml
+++ b/v3/queries.yaml
@@ -160,7 +160,7 @@ election:
         ORDER BY e._ROWID_
 
     q_voting_persons: |
-        SELECT DISTINCT m.pid, p.email
+        SELECT DISTINCT m.pid, p.name, p.email
         FROM mayvote m
         JOIN issue i ON m.iid = i.iid
         JOIN person p ON m.pid = p.pid
diff --git a/v3/steve/election.py b/v3/steve/election.py
index e861b9a..ab7e914 100644
--- a/v3/steve/election.py
+++ b/v3/steve/election.py
@@ -531,6 +531,14 @@ class Election:
         "Set the close_at timestamp for this Election."
         self.c_set_close_at.perform(timestamp, self.eid)
 
+    def get_voters_for_email(self):
+        "Return a list of distinct voters (pid, name, email) eligible for this election."
+        self.q_voting_persons.perform(self.eid)
+        return [
+            {'pid': row.pid, 'name': row.name, 'email': row.email}
+            for row in self.q_voting_persons.fetchall()
+        ]
+
 
 def not_found(cursor, key):
     row = cursor.first_row(key)


(steve) 02/02: refactor: return voter records as EasyDict objects in get_voters_for_email

Posted by gs...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gstein pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/steve.git

commit b6a278541b77109c66a76901d640c327cc543e75
Author: Greg Stein <gs...@gmail.com>
AuthorDate: Fri Feb 27 07:40:54 2026 -0600

    refactor: return voter records as EasyDict objects in get_voters_for_email
    
    Co-authored-by: aider (openrouter/x-ai/grok-code-fast-1) <ai...@aider.chat>
---
 v3/steve/election.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/v3/steve/election.py b/v3/steve/election.py
index ab7e914..f99bc3b 100644
--- a/v3/steve/election.py
+++ b/v3/steve/election.py
@@ -535,7 +535,7 @@ class Election:
         "Return a list of distinct voters (pid, name, email) eligible for this election."
         self.q_voting_persons.perform(self.eid)
         return [
-            {'pid': row.pid, 'name': row.name, 'email': row.email}
+            edict(pid=row.pid, name=row.name, email=row.email)
             for row in self.q_voting_persons.fetchall()
         ]