Skip to content

More miscellaneous cuDF Python testing cleanups - #22713

Merged
rapids-bot[bot] merged 8 commits into
NVIDIA:mainfrom
mroeschke:cudf/ref/misc_clean
May 30, 2026
Merged

More miscellaneous cuDF Python testing cleanups#22713
rapids-bot[bot] merged 8 commits into
NVIDIA:mainfrom
mroeschke:cudf/ref/misc_clean

Conversation

@mroeschke

@mroeschke mroeschke commented May 29, 2026

Copy link
Copy Markdown
Contributor

Description

Checklist

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

@mroeschke mroeschke self-assigned this May 29, 2026
@mroeschke
mroeschke requested a review from a team as a code owner May 29, 2026 17:20
@mroeschke mroeschke added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 29, 2026
@mroeschke
mroeschke requested review from bdice and vyasr May 29, 2026 17:20
@github-actions github-actions Bot added the Python Affects Python cuDF API. label May 29, 2026
@GPUtester GPUtester moved this to In Progress in cuDF Python May 29, 2026
@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Review 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: feeecbc0-43b7-4e85-a10a-b598f121ff0d

📥 Commits

Reviewing files that changed from the base of the PR and between f61d29a and 43c2522.

📒 Files selected for processing (1)
  • python/cudf_polars/tests/conftest.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • python/cudf_polars/tests/conftest.py

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Fixed resource cleanup in test fixtures to ensure proper thread pool management.
  • Tests

    • Updated testing utilities for more consistent and deterministic behavior across test runs.
    • Removed unnecessary warning filters from documentation test configurations.

Walkthrough

Removes the seed parameter from set_random_null_mask_inplace and seeds RNG with 0; deletes a doctest filterwarnings entry for StringMethods.edit_distance_matrix; and updates parquet_stats_executor fixture to construct the ThreadPoolExecutor via a context manager.

Changes

Testing Infrastructure Updates

Layer / File(s) Summary
Deterministic null mask generation
python/cudf/cudf/testing/_utils.py
set_random_null_mask_inplace removes the seed parameter and initializes the RNG with a fixed seed (0) for deterministic null mask generation.
Doctest warning filter configuration
python/cudf/cudf/tests/test_doctests.py
Removed the pytest.mark.filterwarnings entry for the StringMethods.edit_distance_matrix doctest from marks_for_doctests.
parquet_stats_executor fixture
python/cudf_polars/tests/conftest.py
parquet_stats_executor now constructs ThreadPoolExecutor using with concurrent.futures.ThreadPoolExecutor() as executor: and yields the executor to tests so it is cleaned up at teardown.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • rapidsai/cudf#22706: Modifies doctest warning-filtering behavior and relates to test_doctests.py changes.

Suggested labels

cudf-polars

Suggested reviewers

  • vyasr
  • bdice
  • TomAugspurger
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title uses the vague and generic term 'miscellaneous cleanups' that does not clearly convey what the specific changes are, making it difficult for developers scanning history to understand the primary focus. Consider using a more specific title such as 'Remove deprecated doctest filter, seed random mask generator, and ensure ThreadPoolExecutor cleanup' to better describe the three distinct changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly relates to the changeset by explaining the three main changes: removing a doctest filter, seeding a testing utility function, and ensuring proper ThreadPoolExecutor cleanup.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/cudf/cudf/testing/_utils.py`:
- Around line 75-79: set_random_null_mask_inplace currently removed the seed
parameter which breaks callers; restore a seed=None parameter in the function
signature and mark it as deprecated: accept seed (default None), if seed is not
None create rng = np.random.default_rng(seed) else use rng =
np.random.default_rng() so behavior is deterministic only when seed is provided;
emit a warnings.warn(..., DeprecationWarning) when seed is used to indicate it
will be removed in a future release and update the function docstring to mention
the deprecated seed argument; keep the rest of the logic (mask generation with
rng.choice) unchanged and reference the function name
set_random_null_mask_inplace in the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 597e459e-c2ab-4e90-a659-1620c6ca20cf

📥 Commits

Reviewing files that changed from the base of the PR and between 4602000 and 6dbb5ef.

📒 Files selected for processing (2)
  • python/cudf/cudf/testing/_utils.py
  • python/cudf/cudf/tests/test_doctests.py
💤 Files with no reviewable changes (1)
  • python/cudf/cudf/tests/test_doctests.py

Comment thread python/cudf/cudf/testing/_utils.py
@mroeschke
mroeschke requested a review from a team as a code owner May 29, 2026 19:50
@github-actions github-actions Bot added the cudf-polars Issues specific to cudf-polars label May 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@python/cudf_polars/tests/conftest.py`:
- Around line 409-410: The ThreadPoolExecutor created in the `with
concurrent.futures.ThreadPoolExecutor() as executor:` block is being returned
while the context manager immediately shuts it down; change the `return
executor` to `yield executor` so the executor stays alive for the duration of
the test (i.e., use `yield` in the fixture instead of `return`), ensuring
`executor.submit()` can be called, and keep the surrounding `with` so shutdown
happens after the fixture completes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 7cce789e-d9dd-46a7-8eef-fa5d7dedc795

📥 Commits

Reviewing files that changed from the base of the PR and between 6dbb5ef and f61d29a.

📒 Files selected for processing (1)
  • python/cudf_polars/tests/conftest.py

Comment thread python/cudf_polars/tests/conftest.py Outdated
@vyasr

vyasr commented May 30, 2026

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 9a273f6 into NVIDIA:main May 30, 2026
108 of 109 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in cuDF Python May 30, 2026
@vyasr vyasr changed the title More miscellaneous cuDF Python testing cleanups More miscellaneous cuDF Python testing cleanups May 30, 2026
@vyasr vyasr changed the title More miscellaneous cuDF Python testing cleanups More miscellaneous cuDF Python testing cleanups May 30, 2026
@mroeschke
mroeschke deleted the cudf/ref/misc_clean branch June 1, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cudf-polars Issues specific to cudf-polars 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.

3 participants