Skip to content

Feat 144 grouped election endpoints - #148

Merged
jbriones1 merged 6 commits into
mainfrom
feat_144_grouped-election-endpoints
Aug 5, 2026
Merged

Feat 144 grouped election endpoints#148
jbriones1 merged 6 commits into
mainfrom
feat_144_grouped-election-endpoints

Conversation

@VerrillAng

Copy link
Copy Markdown
Contributor

Feature: Grouped Election Endpoints
closes #144

Description:
Adds optional nominees to GET /election and GET /election/{name} via with_nominees=true.
Guests sees:

  1. name
  2. position
  3. speech.

Admins also get:

  1. computing_id
  2. linked_in
  3. instagram
  4. email
  5. discord_username

Features:

  • Added with_nominees query param on list and single election GET endpoints (default false)
  • Integration tests in test_elections.py for guest/admin list and single endpoints (with and without with_nominees), checking response shape and that private fields are hidden from guests

@jbriones1
jbriones1 self-requested a review June 4, 2026 21:36

@jbriones1 jbriones1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the PR and for writing tests! Lmk if you have any questions about the changes requests.

Comment thread src/elections/urls.py Outdated
Comment thread src/elections/urls.py Outdated
Comment thread src/elections/urls.py Outdated
Comment thread src/elections/urls.py Outdated
Comment thread src/elections/urls.py Outdated
Comment thread src/elections/urls.py Outdated
Comment thread tests/integration/test_elections.py Outdated
Comment thread tests/integration/test_elections.py Outdated
Comment thread tests/integration/test_elections.py Outdated
Comment thread tests/integration/test_elections.py Outdated

@jbriones1 jbriones1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for changing things based on my feedback.

The tests look good. If you're not too busy and you're willing to, we can discuss how to populate the database with test data and we could make more comprehensive tests.

Comment thread src/elections/crud.py Outdated
Comment thread src/elections/crud.py Outdated
Comment thread src/elections/crud.py Outdated
Comment thread src/elections/urls.py Outdated
Comment thread src/elections/urls.py Outdated
Comment thread src/nominees/urls.py
@VerrillAng
VerrillAng force-pushed the feat_144_grouped-election-endpoints branch from 6684f63 to c2681de Compare August 3, 2026 01:24
@VerrillAng
VerrillAng requested a review from jbriones1 August 4, 2026 23:22

@jbriones1 jbriones1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thank you!

Comment thread src/elections/crud.py
@jbriones1
jbriones1 merged commit 9ed514c into main Aug 5, 2026
4 of 6 checks passed
@jbriones1
jbriones1 deleted the feat_144_grouped-election-endpoints branch August 5, 2026 05:09
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.

Grouped election endpoints

2 participants