-
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
Remove in-house long time interval checking. #279
Conversation
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.
Otherwise all looks good
@trexfeathers ping (if you get time) 😉 |
@pp-mo I forgot about this, but it is now ready to merge. It would also fix at least 1 Iris issue. Could you take a quick look? Thanks! |
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.
@trexfeathers Awesome, thanks! 😄
Just a minor tweak and we're good to go 👍
Co-authored-by: Bill Little <[email protected]>
Thanks for getting this over the line @bjlittle! |
🚀 Pull Request
Description
Closes #274. Removes cf-units' own checking for long time intervals that might prevent certain operations.
This was introduced in #72, but cftime (previously netcdftime) continues to improve handling of long time intervals, and has a more informative error when they can't be handled. This makes our own checking superfluous and also overzealous.
I have removed all tests concerning long time interval errors, since it would be inappropriate for our tests to depend on the behaviour of cftime.
If this change is accepted: a sister PR on Iris will also be needed, since Iris includes some defensive coding to avoid failure when printing an invalid time
Unit
-iris.coords#L346
. To allow for cftime's continuing improvements - including tolerance for previously invalid time spacings - it would be safest to use try-except during the printing rather than a more specific check.Demonstration