Closed braindawg closed 5 years ago
Thanks for your PR, @braindawg, honestly, I'll need to refamiliarize myself with our dev / deployments environments etc before I can review this, but I'll take a shot the next time I can make a Saturday session.
Note, this PR also improves the development environment / experience so it's a little easier to make first time contributions. 👍
All this needs is to:
Added test data for all dates included in the test dates.json, so the site running in local test mode will at least appear to have a complete set of data.
Will work with someone new tonight to user-test the README and see what kind of edits are required to get them running from my repo.
This is a (partial) fix for issue #151 - this will use constants declared within the terraform/ingest file for salary threshold values rather than inline scalar values. Ideally, these constants would be declared in a single place at a higher level so that they could be used by both terraform and the frontend pieces. Currently we have two separately declared sets of constants.
In order to test this patch locally, I had to comment out all of the references to our S3 buckets due to CORS restrictions (in SummaryCharts.js and ExploreCharts.js). To provide an alternative data source, I downloaded the JSON accessible via those buckets (by using Chrome dev tools to grab the source JSON from the actual production Inclucivics page) and stored them locally in the project's /public folder. The employees.csv file needed to go into a subdirectory separated by date.
Here were the files needed and where I stored them relative to the project root:
/public/data/dates.json /public/data/departments.json /public/data/2017-07-14/employees.csv /public/data/summaries.json
And here were the testing-only edits to SummaryCharts.js and ExploreCharts.js:
I think we probably want to either document this process so that it's a little easier for people to figure out how to test this locally, or figure out programmatically whether we're reading from S3 or from local files. Thoughts?