openml / openml-python

Python module to interface with OpenML
https://openml.github.io/openml-python/main/
Other
279 stars 143 forks source link

ci: Update tooling #1298

Closed eddiebergman closed 9 months ago

eddiebergman commented 9 months ago

WIP

What does this PR implement/fix? Explain your changes.

This PR aims to update tooling to ruff. This PR stemmed from cloning the repo and immediately having black format to 88 in my editor due to no file specification.

In general, there's also no import sorting which is probably not problematic for an established repo but good to have.

There should be no breaking changes other than rule FBT which discourages positional boolean arguments. It might be worth disabling this in public user facing functions if it's arleady done to prevent any backwards breaking changes.

Please let me know if I should justify ruff more, there's a lot of good things and very few negatives I could really think of.

How should this PR be tested?

Any other comments?

LennartPurucker commented 9 months ago

Some open TODOs for this refactor (I will edit this comment while working on this):

codecov-commenter commented 9 months ago

Codecov Report

Attention: 140 lines in your changes are missing coverage. Please review.

Comparison is base (56895c2) 84.92% compared to head (52c4d1f) 71.14%.

:exclamation: Current head 52c4d1f differs from pull request most recent head 42b34e7. Consider uploading reports for the commit 42b34e7 to get more accurate results

Files Patch % Lines
openml/runs/functions.py 56.86% 22 Missing :warning:
openml/extensions/sklearn/extension.py 81.69% 13 Missing :warning:
openml/testing.py 72.91% 13 Missing :warning:
openml/datasets/dataset.py 70.58% 10 Missing :warning:
openml/runs/run.py 60.00% 10 Missing :warning:
openml/utils.py 84.48% 9 Missing :warning:
openml/config.py 82.60% 8 Missing :warning:
openml/tasks/split.py 71.42% 8 Missing :warning:
openml/tasks/functions.py 86.27% 7 Missing :warning:
openml/datasets/functions.py 83.78% 6 Missing :warning:
... and 14 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1298 +/- ## ============================================ - Coverage 84.92% 71.14% -13.78% ============================================ Files 38 38 Lines 5120 5070 -50 ============================================ - Hits 4348 3607 -741 - Misses 772 1463 +691 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

eddiebergman commented 9 months ago

I reset this branch to an earlier commit as I messed up something fixing lint errors. Perhaps it's better to do that in another PR and have this as a clean state where the tests pass (minus the 3.6 version)

eddiebergman commented 9 months ago

One failing test, seems unerlated but not sure

FAILED tests/test_datasets/test_dataset_functions.py::TestOpenMLDataset::test_data_status - openml.exceptions.OpenMLServerException: https://test.openml.org/api/v1/xml/data/status/update returned code 694: Illegal status transition - None
eddiebergman commented 9 months ago

Tested the failing test, it was just flaky and due to the test server