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

Pull in latest finance info automatically #68

Merged
merged 16 commits into from
May 9, 2018
Merged

Conversation

adborden
Copy link
Member

@adborden adborden commented Apr 7, 2018

Wow, this worked out really well, I think. Resolves #66, resolves #67.

I moved the finance info to _data, so human edits to the collection files will persist when you import finance data from disclosure-backend-static. It does have the side-effect of now the ballot data has to be updated manually, but I think that is the eventual goal (since we want to get rid of the spreadsheet).

This allows us to update the finance data automatically, so I created a scheduled task in CI to do this. Pushing to master will still trigger a deploy, but twice daily CI will pull in disclosure-backend-static and deploy the latest finance data.

The finance data is git-ignored, so developers now are required to clone disclosure-backed-static and install the Node.js dependencies in order to get finance data for local development.

This gets us pretty close to merging this repo with disclosure-backend-static, at least superficially. Not sure what the long term plan is for the backend build files. Right now, you don't need to install the ruby dependencies to get the finance data for the front end.

@ghost ghost assigned adborden Apr 7, 2018
@ghost ghost added the in progress label Apr 7, 2018
@adborden adborden requested a review from tdooner April 7, 2018 05:38
@adborden
Copy link
Member Author

adborden commented Apr 7, 2018

Let's hold off on merging this, to avoid conflicts with the other in-flight PRs, but please review if you have a chance.

@adborden adborden changed the title Pull in latest finance info automatically [WIP] Pull in latest finance info automatically Apr 7, 2018
@adborden adborden mentioned this pull request Apr 25, 2018
adborden added 15 commits April 24, 2018 21:32
Committees and referendums have no finance data in them, they exist solely in
collections.
For example, run arbitrary gulp task with:

    $ npm run gulp -- pull:candidates
Remove referendum opposing/supporting from collections, they only exist as
finance data under _data.
We no longer include the finance data in the repo. Developers should run the npm
task to get the latest finance data.
Ignores the finance data in version control.
Trick liquid into using a default empty array.
Specify vendor path for bundler so we can cache that directory.
@adborden adborden force-pushed the feature/auto-finance branch from 79b10df to 08476a5 Compare April 25, 2018 07:11
@adborden adborden changed the title [WIP] Pull in latest finance info automatically Pull in latest finance info automatically Apr 25, 2018
@adborden
Copy link
Member Author

@tdooner this is ready to review! Hold off on merging—I just want to post in slack when merged so that folks know they have to run a few steps to get a working setup. That is...

cd ..
git clone ...disclosure-backend-static
cd odca-jekyll
npm install
npm run gulp
make serve

* upstream/master:
  Update candidate.html
  updated localhost url to reflect proper root being served
  Update _candidate.scss
  Update _candidate.scss
  Second attempt at ticket 164. Added incumbent status, committee name, and expenditure ceiling
  Styling for referendum contributions by type
  Add contributions by type to referendum page
  Remove referendum supporting/opposing pages
  ballot nav added to referendum pages
  CI should build production
@ghost ghost assigned tdooner May 6, 2018
@tdooner
Copy link
Member

tdooner commented May 6, 2018

This looks great, I'm excited for this. I resolved a couple merge conflicts and I think we should be good to go.

Let's make sure to communicate the changes on wednesday. Deferring to you to hit the merge button, @adborden !

@adborden adborden merged commit 0795a30 into master May 9, 2018
@ghost ghost removed the in progress label May 9, 2018
@adborden adborden deleted the feature/auto-finance branch May 9, 2018 02:55
@anlawyer
Copy link
Member

anlawyer commented May 9, 2018

🎉

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.

Automated finance updates Experiment: move generated finance data to _data
3 participants