-
Notifications
You must be signed in to change notification settings - Fork 49
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
Updates for cftime 1.5.0 #168
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* make proper datetimes default * replace cftime.utime.num2date with cftime.num2date * attempt fixes * pass both utime and Unit to _num2date_to_nearest_second * revert _num2date_to_nearest_second calling sequence * dummy commit to kick travis * appease stickler * license headers * contain only_use_cftime_datetimes within utime object * revert test__num2date_to_nearest_second.py * actually pass flag to where it is needed * reinstate type check * Reinstate _num2date_to_nearest_second changes This reverts commit 0b89777. * reinstate test changes * make sure option is passed down num2date
rcomer
commented
May 25, 2021
rcomer
commented
Jun 3, 2021
trexfeathers
reviewed
Jun 7, 2021
stickler-ci
reviewed
Jun 7, 2021
trexfeathers
requested changes
Jun 8, 2021
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.
Thanks so much @rcomer, this is great work, and I'm very glad that someone as experienced as you with units has been working on this problem!
A few changes if you don't mind.
rcomer
commented
Jun 8, 2021
rcomer
commented
Jun 8, 2021
Thanks @trexfeathers for your thorough review. I think I've addressed everything. |
trexfeathers
reviewed
Jun 8, 2021
trexfeathers
approved these changes
Jun 8, 2021
Thanks @trexfeathers! 🎉 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #166. As well as the
utime
object, the julian date functions were also removed at Unidata/cftime#235 and the note in the changelog says they are replaced bytoordinal
andfromordinal
.Note that the first commit here is from #165, which was included in v2.1.5. I have then changed the default behaviour of the various
num2date
functions to return acftime
object, consistent with thecftime.num2date
function. This goes some way to closing #161, though I have not here exposed theonly_use_python_datetimes
option. I agree that that would be desirable, but it would be easy to add in a separate PR and I think there is already more than enough here for the reviewer to wade through!