Fix plotting tests in python covidcast #617
Merged
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.
Fixes #596
Restores passing status to the plotting tests in in covidcast-py, which is needed before we can update the package for API keys.
Changelog:
geopandas.testing.assert_geodataframe_equals
fortest__join_county_geo_df
(see plot samples below)Details
This turns out to have been a change in how the MultiPolygon for North Carolina was notated. The geopandas
assert_geodataframe_equal
correctly identifies the two multipolygons as identical where pandas'assert_frame_equal
does not.If you would like to check their identicalness for yourself:
Original North Carolina multipolygon:
New North Carolina multipolygon:
I wasn't sure whether it would be appropriate to change the other gpkg tests to use
assert_geodataframe_equal
, so I did not. We can always change them later if they, too, break.Along the way, we thought the failure might have something to do with the same Puerto Rico rotation problem we saw in the R package. This turned out to be a red herring, but having the two packages match in their presentation of Puerto Rico seems polite, so I left it in.
New reference plots with unrotated Puerto Rico:
Old state:
New state:
Old no-mega-2:
New no-mega-2:
Old no-mega-1:
New no-mega-1:
Old msa:
New msa:
Old msa-bubble:
New msa-bubble:
Old mega:
New mega:
Development history
(for future reference only; probably not needed for review)
Original test failure:
Test failure message
Hypothesis: We fixed a problem caused by rotations on machines with obscure BLAS configurations in 4835b27 for the R package, but didn't apply the same change to the python package. Try that.
Result: Same failure plus an additional one, though it's probably just that we need to update the reference dfs.
Test failure message for the `assert False`
Next steps: