-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: adding a test for bar plot with intervalrange xaxis #47344
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
Conversation
noatamir
commented
Jun 14, 2022
•
edited
Loading
edited
- closes REGR: Bar plot from Series with IntervalIndex fails in pandas 1.2.0 #38969
- Tests added and passed if fixing a bug or adding a new feature
- All code checks passed.
The smoke test LGTM
|
I have a fix coming up! ✨ |
OK, I think this is ready now. I also opened an issue with Matplotlib to add eq to the Text object in the hope that writing these tests would be easier in the future 😇 |
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.
looks good, couple of small comments
def test_bar_plt_xaxis_intervalrange(self): | ||
# GH 38969 | ||
# Ensure IntervalIndex x-axis produces a bar plot as expected | ||
from matplotlib.text import Text |
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.
We normally don't add these comments, when an issue is linked.
I don't know matplotlib very well, but can we import this at the top?
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.
Looks like we can. I will go ahead and clean it from the other 2 tests that import it.
Huh, do you mean the 2nd line comment? I noticed that most tests in this Misc file do this. But I really don't mind deleting it...
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.
Thx.
Oh interesting. I am not really familiar with our plotting code-base. We try to avoid most comments in tests in other places. I think you can keep it in, if it is consistent with the rest though.
this would be really nice! |
See matplotlib/matplotlib#23273 for follow up ✨ |
@phofl I'm getting this error on the CI now:
Might be because I moved the import up? Any suggestions on how to proceed? revert or what's the underlying cause to address? |
Ah this makes sense. Looks like we are not installing matplotlib everywhere. Reverting is the best way forward here, this explains why the imports were done within the tests. Thanks for trying this out |
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.
LGTM. Merge when ready @phofl
thx @noatamir |