-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fixing shift() for ExtensionArray #23947
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
Hello @varadgunjal! Thanks for updating the PR.
Comment last updated on November 27, 2018 at 20:04 Hours UTC |
Looks like some of the other https://travis-ci.org/pandas-dev/pandas/jobs/46016896. Could you also update the docstring for ExtensionArray.shift adding a note about the expected behavior when |
So, this is the 2nd build I've seen fail. From what I understand from the logs, it looks like the previous implementation of |
Oops sorry, didn't read your comment before I posted the previous one.
Completely slipped my mind. Will do so.
So, what is the correct course of action? Should I dig in further and try to fix those or leave them for a separate PR? |
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.
can you add a whatsnew note, put in the extension array section
ExtensionArray.shift is new in 0.24.0, so just need to make sure that
there's an existing note there.
…On Tue, Nov 27, 2018 at 6:30 AM Jeff Reback ***@***.***> wrote:
***@***.**** requested changes on this pull request.
can you add a whatsnew note, put in the extension array section
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23947 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIg08SGNonHnbSrhdVs1nTtlA3HiYks5uzTBfgaJpZM4Y1Hv0>
.
|
@TomAugspurger so I don't make an edit in whatsnew, correct? Also, how do I address the build failing on the newly added test? |
@varadgunjal it seems like we don't have a dedicated release note for ExtensionArray.shift. Can you add one on ~938 and use |
Just noticed |
Either works.
…On Tue, Nov 27, 2018 at 12:48 PM Varad Gunjal ***@***.***> wrote:
Just noticed 22387 refers to a PR opened by you for issue #22386
<#22386>. Should I ignore that
and keep it as the issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23947 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIrRIzObvX9TXsSkq_iyx5wVjzmyEks5uzYjngaJpZM4Y1Hv0>
.
|
Cool. I still don't get what we're supposed to do about the failing build.though. |
SparseArray defines |
No, same PR. This is why we write base tests for these kinds of things, so
that every extension array implementation behaves correctly.
You don't need to write any new tests, since SparseArray automatically
picks up the one you wrote for this PR.
…On Tue, Nov 27, 2018 at 1:33 PM Varad Gunjal ***@***.***> wrote:
👍
Separate PR I assume?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#23947 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHItLnjNQd29IfrrtUCy_J0F5g5S3Pks5uzZOAgaJpZM4Y1Hv0>
.
|
The newest casualty is |
Feel free to add skips for the arrow tests. That implementation is pretty buggy right now. |
Codecov Report
@@ Coverage Diff @@
## master #23947 +/- ##
==========================================
+ Coverage 92.31% 92.31% +<.01%
==========================================
Files 161 161
Lines 51483 51471 -12
==========================================
- Hits 47525 47517 -8
+ Misses 3958 3954 -4
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #23947 +/- ##
==========================================
- Coverage 92.31% 92.2% -0.11%
==========================================
Files 161 162 +1
Lines 51483 51700 +217
==========================================
+ Hits 47525 47671 +146
- Misses 3958 4029 +71
Continue to review full report at Codecov.
|
@TomAugspurger thanks! Pushed the required changes. |
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.
A few minor doc things. LGTM otherwise.
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.
ping on green.
@@ -39,6 +39,14 @@ class TestInterface(BaseArrowTests, base.BaseInterfaceTests): | |||
def test_repr(self, data): | |||
raise pytest.skip("TODO") | |||
|
|||
def test_shift_non_empty_array(self, data): | |||
raise pytest.skip("Skipping because the implementation of" |
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.
is there an issue for this?
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.
I'll check through the issues list and update in a while. But the reason I added this is @ TomAugspurger's recommendation above.
Feel free to add skips for the arrow tests. That implementation is pretty buggy right now.
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.
can you add an issue for this
@@ -86,3 +87,25 @@ def test_isna_extension_array(self, data_missing): | |||
assert not na.all() | |||
|
|||
assert na.dtype._is_boolean | |||
|
|||
@pytest.mark.parametrize('periods, indices', [ |
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.
I would move this to methods.py I think (and obviously move the overrides in arrow as well)
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.
Since moving this to methods takes it out of the BaseInterfaceTests
class, I can discard the overrides in arrow, since, currently, there is no test class within it deriving from BaseMethodsTests
(or BaseExtensionTests
for that matter). Is that acceptable?
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.
see my comment below
@varadgunjal can you merge master and update to comments |
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.
@varadgunjal you don't need to skip on the arrow tests any longer? or are these just not running the methods tests? ok with running those tests and then skipping for this one (if needed).
This is the current behavior. The implementation of |
Thanks @varadgunjal! |
* Fixing shift() for ExtensionArray pandas-dev#23911
* Fixing shift() for ExtensionArray pandas-dev#23911
git diff upstream/master -u -- "*.py" | flake8 --diff