Skip to content

TEST: Reuse describe test frames - #24122

Open
vyasr wants to merge 1 commit into
NVIDIA:mainfrom
vyasr:codex/reuse-describe-test-frames
Open

TEST: Reuse describe test frames#24122
vyasr wants to merge 1 commit into
NVIDIA:mainfrom
vyasr:codex/reuse-describe-test-frames

Conversation

@vyasr

@vyasr vyasr commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Description

Constructs the read-only pandas/cuDF describe inputs once at module scope and retains every include/exclude and dtype assertion.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vyasr
vyasr requested a review from a team as a code owner September 10, 2026 21:30
@vyasr vyasr added tests Unit testing for project Python Affects Python cuDF API. Performance Performance related issue labels Sep 10, 2026
@vyasr
vyasr requested a review from galipremsagar September 10, 2026 21:30
@vyasr vyasr added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change tests Unit testing for project Python Affects Python cuDF API. Performance Performance related issue labels Sep 10, 2026
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b2b5add0-2ea4-4402-bf03-8f8f4838e2aa

📥 Commits

Reviewing files that changed from the base of the PR and between e78c254 and 5d89c76.

📒 Files selected for processing (1)
  • python/cudf/cudf/tests/dataframe/methods/test_describe.py

Included review availability: Your plan provides up to 12 included reviews per hour; 6 remain after this review.


📝 Summary

Summary by CodeRabbit

  • Tests
    • Improved coverage for DataFrame description behavior across pandas and cuDF.
    • Consolidated include/exclude scenarios into fixture-driven tests.
    • Standardized result normalization and comparison to make cross-library validation more consistent.
    • Updated the test file’s copyright notice.

Walkthrough

The describe tests now use a module-scoped fixture for pandas and cuDF DataFrames. A shared helper normalizes and compares describe results. Include and exclude coverage uses fixture-based tests.

Changes

Describe test consolidation

Layer / File(s) Summary
Shared describe fixture and comparison helper
python/cudf/cudf/tests/dataframe/methods/test_describe.py
The tests replace shared parameterization with a module-scoped describe_frame fixture. _assert_describe_equal computes, normalizes, and compares pandas and cuDF describe results.
Include and exclude option coverage
python/cudf/cudf/tests/dataframe/methods/test_describe.py
The tests iterate over supported include and exclude options through the shared fixture and comparison helper.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: mroeschke

Merge Risk: ⚪ Minimal · up to 5d89c

This PR only refactors describe-related unit tests to reuse module-scoped pandas/cuDF fixtures and a shared comparison helper, without altering any production behavior. The consolidation preserves existing include/exclude and dtype assertions, and there is no indication that the shared fixture is mutated across tests. This is safe to merge with normal test-suite validation.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: reusing test DataFrame inputs for describe tests.
Description check ✅ Passed The description accurately explains module-scoped pandas/cuDF describe inputs and retained include/exclude and dtype assertions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

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 Performance Performance related issue Python Affects Python cuDF API. tests Unit testing for project

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant