-
Notifications
You must be signed in to change notification settings - Fork 49
num2pydate #172
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
num2pydate #172
Conversation
|
I'd like to get this into v3 if practicable, since users who might want it will likely have to update their |
Codecov Report
@@ Coverage Diff @@
## master #172 +/- ##
==========================================
+ Coverage 90.59% 90.63% +0.04%
==========================================
Files 7 7
Lines 829 833 +4
Branches 105 105
==========================================
+ Hits 751 755 +4
Misses 64 64
Partials 14 14
Continue to review full report at Codecov.
|
trexfeathers
left a comment
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.
Great idea @rcomer, just a tiny change for you...
|
The pre-commit.ci failure is expected since I've activated it for this repo but the config file is still waiting in another PR. |
|
Thanks @trexfeathers, I have made that change and also updated the license headers on the new test modules to the new style. I assume the pre-commit failure just means I need to rebase again once #179 is merged? Edit: "jinx!" |
|
OK @rcomer, I promise to not make any more conflicting changes to the code base. If you can rebase one last time, this is the next PR to go in! |
|
Thanks @trexfeathers! I have now rebased, blackened my changes and fixed some offending imports that were in the wrong order. |
🚀 Pull Request
Hopefully a simple one!
Description
This PR exposes
cftime'sonly_use_python_datetimeskeyword in ournum2datefunction and method. Also adds a conveniencenum2pydatefunction and method following cftime's num2pydate. This should make life easier for users who work exclusively with the standard calendar.I couldn't find any existing tests for the
num2dateutility function, so added a new module. I've kept the new tests pretty minimal as they are really just checking that the args have been passed correctly to the next function down.