-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: timeseries in plotting clean up #28020
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
CLN: timeseries in plotting clean up #28020
Conversation
|
||
|
||
class TestTimeDeltaConverter: | ||
def setup_method(self, method): |
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're trying to move away from the setup_
-style of tests. Can you use the full name in the test?
) | ||
def test_format_timedelta_ticks(self, x, decimal, format_expected): | ||
tdc = converter.TimeSeries_TimedeltaFormatter | ||
result = tdc.format_timedelta_ticks(x, pos=None, n_decimals=decimal) |
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.
would it be worthwhile to parametrize over pos
values here? or would that obscure the logic we actually care about testing?
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.
pos
is not being used in format_timdelta_ticks
function, honestly i am not sure why/how this is used. So i just keep as is for now. @jbrockmendel
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.
Leaving it as is sounds fine, thanks for looking into it.
do you prefer to remove |
fancy a merge? :D @TomAugspurger |
Seems OK to me though not super familiar with this part of the code base. Looking at the comment preceding your change, is _format_coord something we can get rid of as well (OK as separate PR - just curious) |
lgtm. can you merge master and ping on green. |
ping @jreback |
Thanks @charlesdong1991 |
format_timedelta_ticks
appears both intimeseries.py
andmatplotlib.converter.py
, and there is no test. Then i look through the code base, it is only used inmatplotlib.converter.py
forTimeSeries_TimedeltaFormatter
. So I remove the one intimeseries.py
and add test for it.black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff