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

[REVIEW] Fix getattr logic in GroupBy #5578

Merged
merged 3 commits into from
Jun 26, 2020

Conversation

shwina
Copy link
Contributor

@shwina shwina commented Jun 25, 2020

Noticed that our logic for getattr in GroupBy could lead to misleading error messages when an AttributeError is raised within any propertys in GroupBy. See encode/django-rest-framework#2108 for a description of the problem.

@shwina shwina requested a review from a team as a code owner June 25, 2020 20:14
@GPUtester
Copy link
Collaborator

Please update the changelog in order to start CI tests.

View the gpuCI docs here.

def test_groupby_attribute_error():
err_msg = "Test error message"

class TestGroupBy(cudf.core.groupby.GroupBy):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We're depending on some internals of groupby in this test. I don't like it but couldn't figure out a better solution

Copy link
Collaborator

Choose a reason for hiding this comment

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

By internals are you just referring to cudf.core.groupby.GroupBy?

@kkraus14 kkraus14 added 5 - Ready to Merge Testing and reviews complete, ready to merge Python Affects Python cuDF API. labels Jun 25, 2020
@shwina
Copy link
Contributor Author

shwina commented Jun 25, 2020

rerun tests

@codecov
Copy link

codecov bot commented Jun 25, 2020

Codecov Report

Merging #5578 into branch-0.15 will decrease coverage by 2.78%.
The diff coverage is 87.79%.

Impacted file tree graph

@@               Coverage Diff               @@
##           branch-0.15    #5578      +/-   ##
===============================================
- Coverage        88.65%   85.86%   -2.79%     
===============================================
  Files               57       72      +15     
  Lines            10945    12172    +1227     
===============================================
+ Hits              9703    10452     +749     
- Misses            1242     1720     +478     
Impacted Files Coverage Δ
python/cudf/cudf/core/__init__.py 100.00% <ø> (ø)
python/cudf/cudf/core/column/datetime.py 84.00% <ø> (-0.42%) ⬇️
python/cudf/cudf/utils/cudautils.py 48.32% <0.00%> (+2.11%) ⬆️
python/cudf/cudf/core/column/categorical.py 93.45% <50.00%> (-0.27%) ⬇️
python/cudf/cudf/core/multiindex.py 79.87% <80.64%> (-0.76%) ⬇️
python/cudf/cudf/core/dataframe.py 89.10% <86.11%> (-0.14%) ⬇️
python/cudf/cudf/core/index.py 90.44% <86.27%> (-1.10%) ⬇️
python/cudf/cudf/core/column/column.py 87.83% <87.50%> (+0.46%) ⬆️
python/cudf/cudf/utils/dtypes.py 87.58% <88.23%> (+1.15%) ⬆️
python/cudf/cudf/core/groupby/groupby.py 93.46% <90.00%> (+0.19%) ⬆️
... and 26 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 f07d0f5...165c39d. Read the comment docs.

@galipremsagar galipremsagar merged commit 585d94c into rapidsai:branch-0.15 Jun 26, 2020
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 Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants