-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
Cut/paste (most) remaining tz funcs to tslibs/timezones #17526
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.
looks fine. need to get passing of course. also run some asv for timezones to confirm no changes.
pandas/_libs/period.pyx
Outdated
@@ -254,7 +252,7 @@ def period_ordinal(int y, int m, int d, int h, int min, | |||
return get_period_ordinal(y, m, d, h, min, s, us, ps, freq) | |||
|
|||
|
|||
cpdef int64_t period_ordinal_to_dt64(int64_t ordinal, int freq) nogil: | |||
cpdef period_ordinal_to_dt64(int64_t ordinal, int freq) nogil: |
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.
?
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.
That's a mistake-- and apparently the cause of the build errors. Just pushed a fix.
|
can you run benches for |
|
those are wildly inconsitent. do are using affinity? |
Did the previous asv run on the laptop. New one on the desktop:
|
ok that looks good. something failing.ping when green. |
Codecov Report
@@ Coverage Diff @@
## master #17526 +/- ##
==========================================
+ Coverage 91.18% 91.2% +0.02%
==========================================
Files 163 163
Lines 49545 49606 +61
==========================================
+ Hits 45179 45245 +66
+ Misses 4366 4361 -5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #17526 +/- ##
==========================================
+ Coverage 91.18% 91.2% +0.02%
==========================================
Files 163 163
Lines 49545 49606 +61
==========================================
+ Hits 45179 45245 +66
+ Misses 4366 4361 -5
Continue to review full report at Codecov.
|
ping. |
thanks; would take a followup for _ renaming as well. |
We're very nearly done with
tslibs.timezones
. I had hoped to bring over the remaining functions in smaller chunks, but this turns out to be the smallest independent subset that contains_get_dst_info
andmaybe_get_tz
.Getting
_get_dst_info
andmaybe_get_tz
separated is a milestone because it allows us to movetseries.frequencies.Resolution
and related functions into cython without having a dependency ontslib
. This in turn gets the dependency onkhash
out oftslib
. A few more nice things become feasible.This is almost pure cut/paste. The only change I made was replacing
isinstance(tz, string_types)
withis_string_object(tz)
. If requested, I'll do a follow-up to de-privatize the names.timezones
is within spitting distance of being valid python. Getting it over that hump would allow linting and coverage that is tough as it is.Note that if/when #17363 is merged, a bunch of residual imports in
tslib
can be cleaned up.git diff upstream/master -u -- "*.py" | flake8 --diff