Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5365- Remove by_office and by_party endpoints #5446

Merged
merged 1 commit into from
May 25, 2023

Conversation

cnlucas
Copy link
Member

@cnlucas cnlucas commented May 15, 2023

Summary (required)

Removes deprecated endpoints by_office and by_office/by_party

Required reviewers

1-2 dev

Impacted areas of the application

General components of the application that this PR will affect:

  • API

Screenshots

Screen Shot 2023-05-15 at 3 42 10 PM

How to test

  • Activate your local pyenv
  • pull this branch
  • pytest
  • See that candidates/totals/by_office and by_office/by_party have been removed. Run a few queries using the new endpoint candidate/totals/aggregates and use aggregate_by office-party

1)aggregate_by=office; office=H; election_year=2022
sample endpoint url:
/candidates/totals/aggregates/?aggregate_by=office&election_year=2022&election_full=true&is_active_candidate=true&per_page=100&office=H

local url:
http://127.0.0.1:5000/v1/candidates/totals/aggregates/?aggregate_by=office&election_year=2022&election_full=true&is_active_candidate=true&per_page=100&office=H

2)aggregate_by=office-party; office=H; election_year=2022
sample endpoint url:
/candidates/totals/aggregates/?aggregate_by=office-party&election_year=2022&election_full=true&is_active_candidate=true&per_page=100&office=H

local url:
http://127.0.0.1:5000/v1/candidates/totals/aggregates/?aggregate_by=office-party&election_year=2022&election_full=true&is_active_candidate=true&per_page=100&office=H

3)aggregate_by=office; office=H; min_election_cycle; max_election_cycle
sample endpoint url:
/candidates/totals/aggregates/?aggregate_by=office&min_election_cycle=2018&max_election_cycle=2022&election_full=true&is_active_candidate=true&per_page=100&office=H

local url
http://127.0.0.1:5000/v1/candidates/totals/aggregates/?aggregate_by=office&min_election_cycle=2018&max_election_cycle=2022&election_full=true&is_active_candidate=true&per_page=100&office=H

@cnlucas cnlucas requested review from fec-jli, hcaofec and tmpayton May 15, 2023 19:05
@cnlucas cnlucas changed the title 5365- Remove by_ofice and by_party endpoints 5365- Remove by_office and by_party endpoints May 15, 2023
Copy link
Contributor

@fec-jli fec-jli left a comment

Choose a reason for hiding this comment

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

It looks good. Thanks

@fec-jli fec-jli merged commit 4a8f302 into develop May 25, 2023
@cnlucas cnlucas deleted the feature/5365-remove-dep-endpoints branch July 22, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove totals/by_party and totals/by_office (5026 follow-up)
2 participants