This pull request continues to climb the automated RTV import mountain, picking up from #126, #127 and adding a new app/Services/RockTheVote function, createReport, that executes a POST /reports API request. It also adds:
A rock_the_vote_reports table, for keeping track of reports we've created and whether we need to import them (or already did)
A web form at /rock-the-vote/imports/create to test the function by passing since and before parameters, which is what we'll need eventually for generating reports hourly
How should this be reviewed?
Can test creating a report via the webform, it won't affect much except adding another report to the list of reports in our Rock The Vote portal (Tej said this is a non-issue). Testing will be a bit trickier once we want to start importing these reports once created, but that's for another PR.
Any background context you want to provide?
Next up will be starting on importing the report once it's status is complete (the statuses a report has before it's done are queued, building, and merging), making use of the imported_at field to determine which reports we need to import when completed.
What's this PR do?
This pull request continues to climb the automated RTV import mountain, picking up from #126, #127 and adding a new
app/Services/RockTheVote
function,createReport
, that executes aPOST /reports
API request. It also adds:A
rock_the_vote_reports
table, for keeping track of reports we've created and whether we need to import them (or already did)A web form at
/rock-the-vote/imports/create
to test the function by passingsince
andbefore
parameters, which is what we'll need eventually for generating reports hourlyHow should this be reviewed?
Can test creating a report via the webform, it won't affect much except adding another report to the list of reports in our Rock The Vote portal (Tej said this is a non-issue). Testing will be a bit trickier once we want to start importing these reports once created, but that's for another PR.
Any background context you want to provide?
Next up will be starting on importing the report once it's status is
complete
(the statuses a report has before it's done arequeued
,building
, andmerging
), making use of theimported_at
field to determine which reports we need to import when completed.Relevant tickets
References Pivotal #171656723.
Checklist