-
Notifications
You must be signed in to change notification settings - Fork 15
Add cftime support for non-standard calendars #344
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
Add cftime support for non-standard calendars #344
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
bd5c2df
to
dda122a
Compare
We may want to style the formatting further. In particular this
|
d996c73
to
febd860
Compare
41e6350
to
9e76c41
Compare
Got the coverage to 65 percent from 0. Little bit done with adding tests and this should be good enough for now. |
Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
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.
Pull Request Overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
One more question. Looking good!
Maybe I will add a bit more tests in the next few days but otherwise this is good to go. |
Autoformatting prefix and suffix are bugged. Will do this in another PR. I think the coverage is now 78% which is good enough for now. Will wait for codecov confirmation |
This PR introduces support for plotting data with non-standard calendars using
cftime
.Key changes:
CFTimeConverter
to enablematplotlib
to handlecftime.datetime
objects.AutoDatetimeLocator
andAutoDatetimeFormatter
for automatic, "nice" tick generation oncftime
axes, mimickingmatplotlib
's behavior for standarddatetime
objects.pytest-mpl
to ensure visual consistency of plots with non-standard calendars.This resolves issues where plots with non-standard calendars had incorrect or poorly formatted time axes.
Continuation of #289