From 58ec47fabda41326b6d5d49f8f69afcd91199dd5 Mon Sep 17 00:00:00 2001 From: Aniruddha Date: Thu, 1 Oct 2026 14:45:26 +0530 Subject: [PATCH 1/3] test(preprocessing): mark the inf-mask timing guards as slow Both inf-mask performance guards in this file assert a wall-clock ratio against the other path, but neither carried a `slow` marker, so `pytest -m "not slow"` in the PR matrix did not deselect them and two wall-clock assertions ran in every pull request job. On the macos-15 / 3.14 / highest runner the fragmented-frame guard measured 8.79ms against a 6.94ms pandas baseline and failed its 1.25x budget, turning a PR that does not touch `clean.py` or the inf-mask paths red. The failure is a property of the runner, not of the code, so it makes unrelated PRs fail and trains reviewers to discount the signal. The docstring of the first guard already states it is "marked `slow` to run at merge time", so this adds the marker that was intended, and applies it to the sibling single-block guard which has the same shape. Both now run only in the merge-time matrix. The deterministic checks are untouched and still run in every PR: each guard first asserts the two paths agree element-for-element before timing them, and that assertion is the one that actually catches a regression in this code. --- changelog/1336.changed.md | 1 + tests/test_preprocessing/test_inf_handling.py | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 changelog/1336.changed.md diff --git a/changelog/1336.changed.md b/changelog/1336.changed.md new file mode 100644 index 000000000..e97d6d0a6 --- /dev/null +++ b/changelog/1336.changed.md @@ -0,0 +1 @@ +Mark the two inf-mask performance guards in `test_inf_handling.py` as `slow` so their wall-clock assertions no longer run in the pull request test matrix diff --git a/tests/test_preprocessing/test_inf_handling.py b/tests/test_preprocessing/test_inf_handling.py index ada39ee5b..416a1bca5 100644 --- a/tests/test_preprocessing/test_inf_handling.py +++ b/tests/test_preprocessing/test_inf_handling.py @@ -928,6 +928,7 @@ def test__process_text_na_dataframe__single_float_block_round_trips_infs() -> No assert got_neg[3, 2] +@pytest.mark.slow @pytest.mark.skipif(PANDAS_BELOW_3, reason="native pandas <3.0.0 is faster and in use") def test__inf_mask__per_block_path_not_slower_than_pandas_on_fragmented() -> None: """On a fragmented frame the per-block numpy path beats pure pandas. @@ -959,6 +960,7 @@ def test__inf_mask__per_block_path_not_slower_than_pandas_on_fragmented() -> Non ) +@pytest.mark.slow def test__inf_mask__pandas_path_not_slower_than_per_block_on_single_block() -> None: """On a consolidated float frame the fast pandas path beats per-block numpy. From 2db5d74a576c668ddc879646f1bdb3078ab5067a Mon Sep 17 00:00:00 2001 From: Aniruddha Date: Thu, 1 Oct 2026 15:34:12 +0530 Subject: [PATCH 2/3] The inf-mask performance guards in test_inf_handling.py now carry the `slow` marker their docstring already described, so their wall-clock assertions run in the merge-time matrix rather than in every pull request job. Co-Authored-By: Claude Opus 4.8 (1M context) --- changelog/{1336.changed.md => 1337.changed.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelog/{1336.changed.md => 1337.changed.md} (100%) diff --git a/changelog/1336.changed.md b/changelog/1337.changed.md similarity index 100% rename from changelog/1336.changed.md rename to changelog/1337.changed.md From 6cb9e1a2d8ac6730d10926c07dd6f9fee01152b8 Mon Sep 17 00:00:00 2001 From: Aniruddha Adak Date: Fri, 2 Oct 2026 00:09:09 +0530 Subject: [PATCH 3/3] Drop the changelog fragment: the "no changelog needed" label makes it the failure The scientific-python/action-towncrier-changelog check exits 1 when a skip label is present AND a changelog file exists in the PR. So the fragment added in 58ec47f is what keeps the "Changelog entry" check red, not the absence of one. The repo README lists test refactoring as a case where the label is the right answer, and a maintainer has since applied it to this PR. Leaving the fragment in place guarantees a permanently red check; removing it lets the label do its job. --- changelog/1337.changed.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 changelog/1337.changed.md diff --git a/changelog/1337.changed.md b/changelog/1337.changed.md deleted file mode 100644 index e97d6d0a6..000000000 --- a/changelog/1337.changed.md +++ /dev/null @@ -1 +0,0 @@ -Mark the two inf-mask performance guards in `test_inf_handling.py` as `slow` so their wall-clock assertions no longer run in the pull request test matrix