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

Fix warnings in test_categorical.py. #10354

Merged
merged 8 commits into from
Feb 25, 2022

Conversation

bdice
Copy link
Contributor

@bdice bdice commented Feb 24, 2022

This PR catches or silences warnings in test_categorical.py. (I am working through one test file at a time so we can enable -Werr in the future.) Most of the warnings come from deprecated inplace arguments to pandas' categorical functions. The inplace argument will be removed in pandas 2.0. Until then, we should just hide the warning.

Additionally, I refactored some inplace behavior to make the expected behavior of the test clearer.

@bdice bdice self-assigned this Feb 24, 2022
@bdice bdice requested a review from a team as a code owner February 24, 2022 22:07
@bdice bdice added Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 24, 2022
@@ -401,8 +414,9 @@ def test_categorical_as_unordered(pd_str_cat, inplace):
[
pytest.param(
True,
marks=pytest.mark.xfail(
reason="https://github.com/pandas-dev/pandas/issues/43232"
marks=pytest.mark.skipif(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This xfail can be replaced by a skipif because the underlying bug pandas-dev/pandas#43232 was resolved in pandas 1.3.4.

@codecov
Copy link

codecov bot commented Feb 24, 2022

Codecov Report

Merging #10354 (2df8efb) into branch-22.04 (aa746ae) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head 2df8efb differs from pull request most recent head efa7b61. Consider uploading reports for the commit efa7b61 to get more accurate results

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.04   #10354      +/-   ##
================================================
- Coverage         10.62%   10.62%   -0.01%     
================================================
  Files               122      122              
  Lines             20973    20974       +1     
================================================
  Hits               2228     2228              
- Misses            18745    18746       +1     
Impacted Files Coverage Δ
python/cudf/cudf/core/_compat.py 0.00% <0.00%> (ø)

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 aa746ae...efa7b61. Read the comment docs.

@shwina
Copy link
Contributor

shwina commented Feb 25, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 3f175ce into rapidsai:branch-22.04 Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants