[caciviclab/disclosure-backend-static] Committee endpoint (#16)

0 views
Skip to first unread message

Aaron D Borden

unread,
Sep 16, 2016, 12:14:04 AM9/16/16
to caciviclab/disclosure-backend-static

Adds a committee endpoint in order to get information about a specific committee.


You can view, comment on, or merge this pull request online at:

  https://github.com/caciviclab/disclosure-backend-static/pull/16

Commit Summary

  • Import oakland committees from google sheet
  • Link committees from schedule E

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Tom Dooner

unread,
Sep 16, 2016, 12:40:19 AM9/16/16
to caciviclab/disclosure-backend-static

@tdooner approved this pull request.

Cool, looks good other than that one weird thing which might actually work because of Ruby :magic:


In calculators/referendum_supporters_calculator.rb:

>      @ballot_measures = ballot_measures
+    @committees_by_filer_id = committees
+      committees.where('"Filer_ID" IS NOT NULL').index_by { |c| c.Filer_ID }

This looks wrong to me, I don't think the WHERE will be applied to the original query.

You should remove the committees on line 5

Aaron D Borden

unread,
Sep 16, 2016, 1:00:10 AM9/16/16
to caciviclab/disclosure-backend-static

@adborden commented on this pull request.


In calculators/referendum_supporters_calculator.rb:

>      @ballot_measures = ballot_measures
+    @committees_by_filer_id = committees
+      committees.where('"Filer_ID" IS NOT NULL').index_by { |c| c.Filer_ID }

Oh yeah, thanks. Totally a typo.

Aaron D Borden

unread,
Sep 16, 2016, 1:27:55 AM9/16/16
to caciviclab/disclosure-backend-static, Push

@adborden pushed 1 commit.


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Aaron D Borden

unread,
Sep 16, 2016, 1:31:50 AM9/16/16
to caciviclab/disclosure-backend-static

So fixing that caused other problems, so it obviously wasn't working. Do I have this right? The committee files schedule E for their expenditures, that actually makes them the "payer" not the "payee", right?

Aaron D Borden

unread,
Sep 16, 2016, 1:48:33 AM9/16/16
to caciviclab/disclosure-backend-static, Push

@adborden pushed 1 commit.


You are receiving this because you are subscribed to this thread.

View it on GitHub or mute the thread.

Aaron D Borden

unread,
Sep 16, 2016, 1:53:47 AM9/16/16
to caciviclab/disclosure-backend-static

Decided to dig into why we still had no IDs for some of the Oakland committees so turned up another fix. Looks like we were able to match a committee to all of the referendum expenditures in oakland 🏆

$ grep -r "id.*null" build/referendum/ | wc -l
0

Tom Dooner

unread,
Sep 17, 2016, 5:16:06 PM9/17/16
to caciviclab/disclosure-backend-static

Merged #16.

Tom Dooner

unread,
Sep 17, 2016, 5:17:33 PM9/17/16
to caciviclab/disclosure-backend-static

Ah yeah, this looks right. Filer_ID should always be a string. Thanks for digging in to find the bug. Next time, you should run make process and include the changes in build to the PR (in a separate commit from the rest of your code changes). 👍

Reply all
Reply to author
Forward
0 new messages