-
Notifications
You must be signed in to change notification settings - Fork 34
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
Annual Owning a Home API county-limit update #121
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
At the end of every year, the owning-a-home API's county-limit data needs to be updated. This PR adds the updated data files needed to load new limits. Database limit records can then be updated with ``` loaddata countylimit_data.json ```
At the end of every year, the owning-a-home API's county-limit data needs to be updated. This PR adds data files and an updated fixture that will load new limits. After the OaH API repo is updated and re-imported into cfgov-refresh, the database limit records can then be updated with this manage.py command: ``` load_county_limits --confirm=y ``` This PR also removes the nasty initial_data fixture that loaded with every deploy, and removes a convoluted dependency on csvkit
higs4281
force-pushed
the
update-countylimit-tables
branch
from
December 16, 2017 01:18
01be241
to
8909055
Compare
higs4281
force-pushed
the
update-countylimit-tables
branch
6 times, most recently
from
December 16, 2017 03:35
db0281c
to
a4b52eb
Compare
At the end of every year, the owning-a-home API's county-limit data need to be updated. This PR adds data files and an updated fixture that will load new limits. After the OaH API repo is updated and re-imported into cfgov-refresh, the database limit records can then be updated in any environment with this manage.py command: ``` load_county_limits --confirm=y ``` This PR also removes the nasty initial_data fixture that loaded with every deploy, and removes a convoluted dependency on csvkit
higs4281
force-pushed
the
update-countylimit-tables
branch
from
December 16, 2017 03:53
a4b52eb
to
96d1ef9
Compare
higs4281
force-pushed
the
update-countylimit-tables
branch
from
December 16, 2017 05:56
28e7ea2
to
f871196
Compare
higs4281
force-pushed
the
update-countylimit-tables
branch
2 times, most recently
from
December 16, 2017 08:03
3074e2d
to
3e9ff8c
Compare
higs4281
force-pushed
the
update-countylimit-tables
branch
from
December 16, 2017 10:29
3e9ff8c
to
9051630
Compare
higs4281
force-pushed
the
update-countylimit-tables
branch
from
December 16, 2017 10:56
9051630
to
ffbbf2c
Compare
hillaryj
approved these changes
Dec 18, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A+ atonement game 🏅
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At the end of every year, the owning-a-home API's county-limit values
need to be updated. This PR adds data files and an updated fixture
that will load the new limits.
After the OaH API repo is updated and re-imported into cfgov-refresh,
the limit records can be updated in any environment's database with
this manage.py command:
The update process is documented at [GHE]/OAH/OAH-notes/wiki/Periodic-data-load-procedures.
Regarding Travisty and atonement
This PR also atones for some sins.
This repo was plagued by mysterious Travis test failures that didn't happen locally, and it turns out it was my doing.
In responding to a security issue about the API's use of unvalidated query strings, I added a whitelist of state values, but in a foolish way. I added this at the top of views.py:
This setup allowed the whitelist to be built just once. But since it was evaluated at Django initialization time, that meant that the whitelist would be empty for testing in Travis, where the view would slap a 400 on any state query, behaving as if there were no states, even when a test loaded fixtures or built its own valid state objects.
This is why an initial_data fixture was the only test-loading strategy that worked in Travis, because it got auto-loaded before views.py was initialized.
So here's a toast to Django 1.9+ and the end of initial_data fixtures entirely!
travisty
(noun) A false assertion that the Travis CI service is a travesty.