-
Notifications
You must be signed in to change notification settings - Fork 286
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
grib1 unit 10 handling #171
Conversation
👍 But.. do you know if there may be various other similar issues, and are we due a review? |
There are bound to be other similar issues. We've not attempted complete coverage, just what's needed by internal use cases. No review pending but feel free to raise an issue for it if you think it will be helpful. |
Ideally, a test would be nice. |
As I already said 👍 ! But... So, don't wait up ! |
@pp-mo, are you recommending this is merged without said test because it's on it's way in a coming pr? |
Yes, absolutely. It's needed for a support enquiry, and the other work will take a while yet. |
Sounds like your future PR has got lots of new tests in? Can we not cherry pick just the one or two that are specific to this change? |
It's not (just) the coverage, I'm still sorting out the revised testing method and (still) not yet ready to commit it. |
datetime.timedelta(int(time_diff))) | ||
elif unit_of_time == 10: # 3 hours | ||
verification_date = (reference_date_time + | ||
datetime.timedelta(0, 0, 0, 0, 0, int(time_diff*3))) |
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.
All of these timedelta constructor calls would be much better written using keywords, e.g.:
datetime.timedelta(hours=int(time_diff * 3))
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, I'll add this improvement in my upcoming change to support additional unit codes.
The changes will significantly tidy this code anyway, as I discovered the unit conversions can be unified in one place with considerable benefit.
There are external time pressures for getting this extension onto master, so I'm going to merge as it currently stands. |
GRIB1 time-unit 10 handling
@pp-mo If you could include the timedelta-using-keywords change mentioned above in your upcoming PR that would be lovely, thank you. :) |
Ok, as noted above. |
replaces #168, now pulling to master