-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
implement shift_quarters --> apply_index for quarters and years #18522
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
Conversation
|
Travis error looks unrelated: |
Maybe, though as you know, we need all green to merge. I'll double-check that the error wasn't spurious. |
Codecov Report
@@ Coverage Diff @@
## master #18522 +/- ##
==========================================
+ Coverage 91.32% 91.33% +<.01%
==========================================
Files 163 163
Lines 49798 49780 -18
==========================================
- Hits 45479 45465 -14
+ Misses 4319 4315 -4
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18522 +/- ##
==========================================
+ Coverage 91.32% 91.33% +<.01%
==========================================
Files 163 163
Lines 49798 49780 -18
==========================================
- Hits 45479 45465 -14
+ Misses 4319 4315 -4
Continue to review full report at Codecov.
|
|
Not sure how it got to green given that I didn’t re-push... |
@jbrockmendel : I said "I'll double-check that the error wasn't spurious" i.e. I reran the build 😄 |
|
lgtm. ready to go? |
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.
@jbrockmendel @jreback : LGTM!
Neat, thanks. |
|
More thorough asv run: |
|
thanks! |
tslibs.offsets.shift_quartersshould look like the the lovechild ofoffsets.shift_monthsandQuarterOffset.apply. It may be possible to de-duplicate some of that* at some point.We get
apply_indexmethods for all fourYearOffsetsubclasses and all fourQuarterOffsetsubclasses. (Previously there were implementations for the non-business versions, but they went through a code path that I found fragile).BeginMixinis no longer used, removed.All 12 of the (non-custom) Month+Quarter+Year offset subclasses are now parametrized stubs with the actual implementations unified in parent classes.
Small cleanups and notes in offsets.
* It would be convenient to be able to specify a function to accept either a
datetimeor apandas_datetimestructin cases where they quack alike. I tried to do actypedef fused datetimelikebut cython objected. Any thoughts?Running a larger version now.
git diff upstream/master -u -- "*.py" | flake8 --diff