-
Notifications
You must be signed in to change notification settings - Fork 32
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
Update to Django 1.9 and store parameters as JSON object #822
Conversation
…extfield (same as before at SQL level)
Commit Even when using the That means that you have to do add a new migration that specifies that you want to use django.contrib.postgres.fields.JSONField in order to actually change the underlying postgres type to This was tested with the following procedure:
Step 3:
Output:
I also checked the types in the database, |
PR #822 is on the test app at http://ospc-taxes7.herokuapp.com/. I encourage everyone to do their best to try to break the changes pushed by this PR. This is a really big release and a large portion of the TaxBrain internals were either changed or refactored. Run 1533 is a good example for checking out the new parameter deprecation error. Note that only parameters that have changed since the previous version of PolicyBrain qualify for this message. The policy up to now has been to rename columns to what we thought was the parameter's new name. Note that CCC is down on the test app until we figure out how to update the anaconda package. Also, I am now having trouble loading runs submitted before 2016, but the problems described in #812 and #813 are resolved. I will update the RELEASES.md file with a comprehensive list of the changes going into this release. |
@MattHJensen @martinholmer commit |
@hdoupe said:
Look reasonable to me. |
This looks good to me, too. |
@martinholmer and @MattHJensen Thanks for the review. I plan to merge this and do a release as soon as I resolve some minor issues with CCC. |
This PR resolves #811 and implements the plan proposed in this comment.
Upgrading to Django 1.9 gives us access to the JSON column type which was included with Postgres 9.4 (the version used by PolicyBrain). Several important pieces of data that are either already JSON objects or are more usefully stored as JSON objects are:
The goal of this PR is to store the raw input from the GUI as a JSON object.
See Django release notes for 1.8 and 1.9 for further context on the changes requireed for the Django update.
This PR is based off of changes in #814.