Skip to content

[MNT] Update ruff and mypy versions#1637

Open
satvshr wants to merge 30 commits intoopenml:mainfrom
satvshr:ruff
Open

[MNT] Update ruff and mypy versions#1637
satvshr wants to merge 30 commits intoopenml:mainfrom
satvshr:ruff

Conversation

@satvshr
Copy link
Contributor

@satvshr satvshr commented Feb 16, 2026

fixes #1639.

Only major changes in this PR:

  1. ruff version update from v0.14.10 to v0.15.1
  2. mypy version update from v1.13.0 to v1.19.1
    • Had to add a few files to be ignored by mypy (instead of using the suggested approach by @fkiraly to only check for files changed and then chip at it brick-by-brick to fix mypy errors, the architecture of those functions would most likely need to be changed, so if someone was adding a simple test they'd have to fix a ton of errors occuring in that file for other functions, which doesnt make sense)
  3. Adding a fixed file ending check to prevent unwarranted git diffs
  4. Removing trailspaces
  5. Including the tests directory in ruff and mypy checks:
    • Fixed ruff wherever possible and added noqa tags to other places
    • Had to add a few files to be ignored by mypy (for the reason mentioned above in point 2)

@codecov-commenter
Copy link

codecov-commenter commented Feb 16, 2026

Codecov Report

❌ Patch coverage is 82.35294% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.87%. Comparing base (e95675a) to head (e4a3f0d).

Files with missing lines Patch % Lines
openml/cli.py 0.00% 1 Missing ⚠️
openml/flows/functions.py 0.00% 1 Missing ⚠️
openml/tasks/functions.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1637      +/-   ##
==========================================
+ Coverage   52.72%   52.87%   +0.14%     
==========================================
  Files          37       37              
  Lines        4381     4371      -10     
==========================================
+ Hits         2310     2311       +1     
+ Misses       2071     2060      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@satvshr satvshr marked this pull request as ready for review February 20, 2026 11:11
Copy link
Collaborator

@geetu040 geetu040 left a comment

Choose a reason for hiding this comment

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

I think we should keep skipping the tests/files directory. The content there is generated programmatically, and excluding it helps ensure we don't accidentally modify generated artifacts.

Not sure, but after this change it might make sense to adjust pre-commit-config.yaml or pyproject.toml make the skip rule less restrictive.

Also please sync with main, there are some conflicts.

Other than that, the rest of the changes look good to me.

@satvshr
Copy link
Contributor Author

satvshr commented Feb 26, 2026

I think we should keep skipping the tests/files directory.

I think Franz was the one who told me to include the tests/files directory. We should discuss this today in the meeting.


[[tool.mypy.overrides]]
module = ["tests.*", "openml.extensions.sklearn.*"]
module = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should track this in an issue that the following files are being skipped by pre-commit, and should be updated with time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll open an issue if you'd like me too.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes please that would be nice, also mention how could one reproduce these failures, probably remove this file from the list right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what do you mean by "this" file over here?

Copy link
Contributor Author

@satvshr satvshr Mar 2, 2026

Choose a reason for hiding this comment

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

Opened an issue here. It could serve as a good first issue for new contributors, epsecially with the next ESoC around.

Copy link
Collaborator

Choose a reason for hiding this comment

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

what do you mean by "this" file over here?

I mean to reproduce these failures for a particular file one would simply remove for-example tests.test_datasets.test_dataset from the list module in pyproject.toml, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes

@satvshr satvshr mentioned this pull request Mar 2, 2026
Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

@PGijsbers should check whether the changes in the precommits are fine with the entire team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MNT] pre-commit updates

4 participants