Skip to content
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

Sort by index in groupby tests more consistently #7802

Merged
merged 2 commits into from
Apr 1, 2021

Conversation

shwina
Copy link
Contributor

@shwina shwina commented Apr 1, 2021

Pandas sorts the result of a groupby by its index by default, whereas we do not. For testing purposes, we currently call groupby() with sort=True in many of our tests. But some tests (notably newer ones) don't do that. These tests have been passing silently. Until now.

  • adds a assert_groupby_results_equal helper in test_groupby.py, which sorts its inputs by index before comparing them
  • removes the manual sort=True we are doing in each of our groupby tests

@shwina shwina requested a review from a team as a code owner April 1, 2021 00:34
@shwina shwina requested review from cwharris and galipremsagar April 1, 2021 00:34
@github-actions github-actions bot added the Python Affects Python cuDF API. label Apr 1, 2021
@shwina shwina added non-breaking Non-breaking change bug Something isn't working labels Apr 1, 2021
Copy link
Contributor

@galipremsagar galipremsagar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kkraus14 kkraus14 added the 5 - Ready to Merge Testing and reviews complete, ready to merge label Apr 1, 2021
@codecov
Copy link

codecov bot commented Apr 1, 2021

Codecov Report

Merging #7802 (b7a6da1) into branch-0.19 (7871e7a) will increase coverage by 0.78%.
The diff coverage is n/a.

❗ Current head b7a6da1 differs from pull request most recent head 53e5d7f. Consider uploading reports for the commit 53e5d7f to get more accurate results
Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.19    #7802      +/-   ##
===============================================
+ Coverage        81.86%   82.64%   +0.78%     
===============================================
  Files              101      103       +2     
  Lines            16884    17566     +682     
===============================================
+ Hits             13822    14518     +696     
+ Misses            3062     3048      -14     
Impacted Files Coverage Δ
python/cudf/cudf/utils/dtypes.py 83.44% <0.00%> (-6.08%) ⬇️
python/cudf/cudf/core/column/lists.py 87.32% <0.00%> (-4.08%) ⬇️
python/cudf/cudf/core/column/decimal.py 92.68% <0.00%> (-2.19%) ⬇️
python/dask_cudf/dask_cudf/backends.py 87.50% <0.00%> (-2.13%) ⬇️
python/cudf/cudf/core/groupby/groupby.py 92.41% <0.00%> (-1.04%) ⬇️
python/cudf/cudf/core/column/column.py 87.61% <0.00%> (-0.15%) ⬇️
python/cudf/cudf/utils/utils.py 85.36% <0.00%> (-0.07%) ⬇️
python/cudf/cudf/io/feather.py 100.00% <0.00%> (ø)
python/cudf/cudf/utils/ioutils.py 78.71% <0.00%> (ø)
python/cudf/cudf/comm/serialize.py 0.00% <0.00%> (ø)
... and 46 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 299f6cc...53e5d7f. Read the comment docs.

@kkraus14
Copy link
Collaborator

kkraus14 commented Apr 1, 2021

@gpucibot merge

@kkraus14
Copy link
Collaborator

kkraus14 commented Apr 1, 2021

rerun tests

@rapids-bot rapids-bot bot merged commit 45cda02 into rapidsai:branch-0.19 Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants