Skip to content
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

Correctly re-instate Matplotlib converters #27481

Merged
merged 4 commits into from Aug 20, 2019

Conversation

@dstansby
Copy link
Contributor

commented Jul 19, 2019

Fixes #27479. Converters should only be cached to be re-instated if they are original, and not pandas converters.

I'm struggling to write a test for this; I think it requires a clean state with no pandas imports, so one can check what was in the units registry before pandas was imported. I think this means a new test file with no pandas imports at the top, but maybe someone has a better idea?

@TomAugspurger

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2019

Thanks for this!

I'm struggling to write a test for this;

Testing these is quite hard (we accidentally broke the warning for a release and didn't notice).

def test_initial_warning():
works reasonably well I think. The idea is to run the check in a subprocess.

@TomAugspurger TomAugspurger added this to the 0.25.1 milestone Jul 19, 2019

@TomAugspurger

This comment has been minimized.

Copy link
Contributor

commented Jul 19, 2019

A release note in whatsnew/0.25.1.rst would be nice to have. I think there's a "plotting" subsection.

@codecov

This comment has been minimized.

Copy link

commented Jul 19, 2019

Codecov Report

Merging #27481 into master will increase coverage by 49.17%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #27481       +/-   ##
===========================================
+ Coverage   42.44%   91.62%   +49.17%     
===========================================
  Files         184      184               
  Lines       50389    50388        -1     
===========================================
+ Hits        21389    46167    +24778     
+ Misses      29000     4221    -24779
Flag Coverage Δ
#multiple 91.62% <100%> (?)
#single ?
Impacted Files Coverage Δ
pandas/plotting/_matplotlib/converter.py 63.64% <100%> (+49.94%) ⬆️
pandas/core/computation/pytables.py 63.71% <0%> (-26.22%) ⬇️
pandas/io/pytables.py 65.55% <0%> (-23.83%) ⬇️
pandas/io/clipboard/clipboards.py 31.88% <0%> (-2.9%) ⬇️
pandas/util/_test_decorators.py 93.84% <0%> (+4.61%) ⬆️
pandas/io/gbq.py 88.88% <0%> (+5.55%) ⬆️
pandas/_config/localization.py 86% <0%> (+6%) ⬆️
pandas/core/dtypes/inference.py 100% <0%> (+13.33%) ⬆️
pandas/compat/numpy/__init__.py 93.1% <0%> (+13.79%) ⬆️
pandas/core/config_init.py 96.2% <0%> (+13.92%) ⬆️
... and 138 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9bab81e...9589b8f. Read the comment docs.

@dstansby

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2019

Thanks for the test tip, the new test fails before the changes in this PR.

doc/source/whatsnew/v0.25.1.rst Show resolved Hide resolved
pandas/plotting/_matplotlib/converter.py Outdated Show resolved Hide resolved
pandas/tests/plotting/test_converter.py Outdated Show resolved Hide resolved

@dstansby dstansby force-pushed the dstansby:mpl-convert-cache branch 2 times, most recently from ad83bef to 81ec586 Jul 20, 2019

@jreback
Copy link
Contributor

left a comment

also pls merge master

doc/source/whatsnew/v0.25.1.rst Outdated Show resolved Hide resolved
@dstansby

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2019

I'm away for the next week or so without a computer, so if anyone wants this in quicker than that feel free to force push to my branch.

@dstansby

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2019

Is there anything else (apart from a rebase) I need to do on this?

@dstansby dstansby force-pushed the dstansby:mpl-convert-cache branch from 81ec586 to 559f258 Aug 5, 2019

@TomAugspurger
Copy link
Contributor

left a comment

Looks good. Ping on green.

@TomAugspurger

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

Did you merge master before pushing? We've seen similar CI failures, but I thought we fixed them all on master.

@dstansby dstansby force-pushed the dstansby:mpl-convert-cache branch from 559f258 to 9c00578 Aug 6, 2019

@dstansby

This comment has been minimized.

Copy link
Contributor Author

commented Aug 6, 2019

Yeah, I should have rebased on to master, I've done another rebase to see if that fixes the tests.

@TomAugspurger

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2019

Merged master again to see if we can get the CI passing.

@dstansby dstansby force-pushed the dstansby:mpl-convert-cache branch from e5d4af2 to 08215e8 Aug 10, 2019

@TomAugspurger TomAugspurger merged commit e55b698 into pandas-dev:master Aug 20, 2019

15 checks passed

codecov/patch 100% of diff hit (target 50%)
Details
codecov/project 91.72% (target 82%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
pandas-dev.pandas Build #20190819.34 succeeded
Details
pandas-dev.pandas (Checks) Checks succeeded
Details
pandas-dev.pandas (Docs) Docs succeeded
Details
pandas-dev.pandas (Linux py35_compat) Linux py35_compat succeeded
Details
pandas-dev.pandas (Linux py36_32bit) Linux py36_32bit succeeded
Details
pandas-dev.pandas (Linux py36_locale_slow) Linux py36_locale_slow succeeded
Details
pandas-dev.pandas (Linux py36_locale_slow_old_np) Linux py36_locale_slow_old_np succeeded
Details
pandas-dev.pandas (Linux py37_locale) Linux py37_locale succeeded
Details
pandas-dev.pandas (Linux py37_np_dev) Linux py37_np_dev succeeded
Details
pandas-dev.pandas (Windows py36_np15) Windows py36_np15 succeeded
Details
pandas-dev.pandas (Windows py37_np141) Windows py37_np141 succeeded
Details
pandas-dev.pandas (macOS py35_macos) macOS py35_macos succeeded
Details
@TomAugspurger

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

Thanks @dstansby. Sorry about the CI issues.

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Aug 20, 2019
TomAugspurger added a commit that referenced this pull request Aug 20, 2019

@dstansby dstansby deleted the dstansby:mpl-convert-cache branch Aug 21, 2019

galuhsahid added a commit to galuhsahid/pandas that referenced this pull request Aug 25, 2019
gabriellm1 added a commit to gabriellm1/pandas that referenced this pull request Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.