Skip to content

MNT Split callback test utils for improved readability - #34728

Merged
lesteve merged 1 commit into
scikit-learn:mainfrom
jeremiedbb:improve-readability-callback-test-utils
Aug 19, 2026
Merged

lesteve merged 1 commit into
scikit-learn:mainfrom
jeremiedbb:improve-readability-callback-test-utils

Conversation

@jeremiedbb

Copy link
Copy Markdown
Member

As we're adding more testing callbacks and estimators in sklearn.callback.test._utils, I find it harder and harder to read and navigate. This PR is just a structural change that proposes to split it into 2:

  • 1 file dedicated to testing callbacks
  • 1 file dedicated to testing estimators

Another motivation for this structural change is that I'm working on adding common tests to check callback support of an estimator (sklearn or third party) and it would be adding new utilities that would have reduced readability once again.

I also didn't keep the name "_utils" but changed it to "_common" since it looked to be what's usually used in the rest of the project for testing utilities.

Finally I also moved skip_callback_test_if_wasm into sklearn.utils._testing because it's where all other markers are defined so it felt like it was a more natural place for it.

ping @FrancoisPgm

@jeremiedbb jeremiedbb added Quick Review For PRs that are quick to review Callbacks labels Aug 11, 2026
@jeremiedbb jeremiedbb changed the title MNT Split callback test utils for improved readbility MNT Split callback test utils for improved readability Aug 11, 2026
@jeremiedbb jeremiedbb moved this to PR waiting for reviews in Labs Aug 11, 2026
@jeremiedbb jeremiedbb added this to Labs Aug 11, 2026

@FrancoisPgm FrancoisPgm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks.
I prefer "utils" over "common", but it's the name used everywhere else so I won't argue.

@lesteve

lesteve commented Aug 19, 2026

Copy link
Copy Markdown
Member

Let's merge this! I honestly haven't looked at it but this is a test-only change and I 100% trust @FrancoisPgm on this.

@lesteve
lesteve merged commit b8d30c1 into scikit-learn:main Aug 19, 2026
50 of 53 checks passed
@github-project-automation github-project-automation Bot moved this from PR waiting for reviews to Done in Labs Aug 19, 2026
prady0t pushed a commit to prady0t/scikit-learn that referenced this pull request Sep 2, 2026
@jeremiedbb
jeremiedbb deleted the improve-readability-callback-test-utils branch September 3, 2026 15:25
@jeremiedbb jeremiedbb mentioned this pull request Sep 8, 2026
14 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Callbacks No Changelog Needed Quick Review For PRs that are quick to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants