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

430 calculated project fields reac #435

Merged
merged 2 commits into from Jul 28, 2017

Conversation

Projects
None yet
1 participant
@NealHumphrey
Copy link
Collaborator

NealHumphrey commented Jul 27, 2017

Adds the functionality to have calculated fields in project table during updates of the database. Implements this for the 'most recent reac score'. Relevant to both #425 and #430.

My only concern so far is maintaining the messy SQL statements required to extract the relevant data from the partner tables. I tried to implement the automap function so that I could try to use SQLAlchemy syntax, but I didn't see a way to then actually use that to do the stuff I wanted to. Straight SQL seemed easier to implement.

At a minimum we could break each field update into a separate method - at the moment I have comments to designate sections of the _populate_calculated_project_fields code, but the could be methods that are listed out one by one just to break up teh code a bit.

@jkwening especially your review would be appreciated!

I have deployed this to the Code for DC RDS instance - we'll be switching over to that one for V2 launch, though for the moment I'm using both the EC2 and RDS instances as sandboxes for testing our changes so we don't break the live site with stuff like this. Contact me for the connect string to add to secrets.json to check it out.

NealHumphrey added some commits Jul 27, 2017

- Adds function to LoadData to populated calculated fields
- Adds 'most recent reac score' calculation
- Adds ability to write to the Code for DC RDS account (need the relevant secret.json connect string to use)
@NealHumphrey

This comment has been minimized.

Copy link
Collaborator Author

NealHumphrey commented Jul 28, 2017

@jkwening heads up I'm going to merge this in as-is, but would still appreciate a second set of eyes w/ a review at some point. There's a bunch of loosely related back end api changes (zonefacts, refactored api, this one) that I'm going to try to consolidate and then swap out our front-end API urls to use all this new stuff for a map-view V1.5 launch early next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment