-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add datetime testing skeleton #26859
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
timedeltas though totally - thinking particularly of the American time use survey |
put pie back |
If we merge this I will write up a tracking issue with checklist of the methods + links etc for tomorrow. |
N = 6 | ||
fig, ax = plt.subplots() | ||
x = np.array([datetime.datetime(2023, 1, n) for n in range(1, N)]) | ||
ax.plot(x, range(1, N)) |
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.
Should you also test ax.plot(range(1, N), x)
and/or ax.plot(x, x)
? It might be good to give an example of what to do when multiple arguments accept units.
timedeltas make sense
d6f8f16
to
604152e
Compare
I think we can skip psd etc. I cannot really see a way to use dates there. |
604152e
to
de6919c
Compare
This is prep work for the 2023 GHC OSD event.
Although we nominally support units through all of our plotting APIs, this is not actually tested. As the most common "unitful" data is likely datetime, this is using datetime as the vehicle to exhaustively test which of the methods correctly handle units.
The ask of the volunteers will be to pick a method and write/find an example that passes
datetime64
ortimedelta64
arrays to as many of the inputs as make sense. Thenax.pie
makes no sense with dates as the input so I pre-emptively removed it...although maybe with timedelta?) open a PR removing that stub testUnfortunately I did not get the test image overhaul done in time so I want to avoid adding test images for now, but smoke tests are still an improvement and once that lands it should be possible to "just" add a decorator to the tests to generate the images in the future.