ray-project / ray

Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.
https://ray.io
Apache License 2.0
34.23k stars 5.81k forks source link

Upgrade flake8 in CI and pre-commit hook. #48022

Open MortalHappiness opened 1 month ago

MortalHappiness commented 1 month ago

This is a subtask of https://github.com/ray-project/ray/issues/47991. See the parent issue for more information.

CheyuWu commented 1 month ago

I'd like to take this

MortalHappiness commented 1 month ago

@CheyuWu could you tell me which rules should be ignored? I'll open seperate sub-issues for them

CheyuWu commented 1 month ago
aslonnie commented 1 month ago

@CheyuWu and @MortalHappiness , do you two know each other and work together?

MortalHappiness commented 1 month ago

@aslonnie Recently, some friends of mine told me that they want to try contributing to open-source projects, so I created some issues in Ray and KubeRay for them to work on. @CheyuWu is one of them.

anyscalesam commented 1 month ago

@CheyuWu @MortalHappiness I think this is a good opportunity to fix the lint errors before the flake8 upgrade so we don't keep kicking this technical debt down the road.

Instead of ignoring and upgrading just flake8 can we instead of fix the lint errors than proceed with the upgrade?

@aslonnie @kevin85421 can shepherd this in as well so in CC.

MortalHappiness commented 1 month ago

@anyscalesam I have upgraded linters in other projects before, and from my experience, it’s better to upgrade the linter first and ignore the new rules for now. This is because linter upgrades usually take serveral PRs and iterations, and new commits will likely be added during that period. If you only update the linter configuration at the end, you might have to fix new style errors caused by the latest commits. That’s why I set the first subtask to upgrade the linter but ignore the new rules for now.

Here is a parent issue tracking the flake8 upgrade progress. https://github.com/ray-project/ray/issues/47991

MortalHappiness commented 1 month ago

cc @jjyao @rynewang because you reviewed this PR https://github.com/ray-project/ray/pull/48006