kedro-org / kedro-viz

Visualise your Kedro data and machine-learning pipelines and track your experiments.
https://demo.kedro.org
Apache License 2.0
680 stars 113 forks source link

Replace `flake8`, `isort`, `pylint` and `black` by `ruff` #2149

Closed yury-fedotov closed 3 weeks ago

yury-fedotov commented 1 month ago

Description

Closes #1670

Development notes

This PR brings ruff to kedro-viz to replace:

It introduces a central ruff.toml file in repo root, to act as a single source of truth for Python codestyle management, and leverages ruff's hierarchical configuration feature to make this config applicable to both the demo-project and package parts of the codebase.

[!NOTE]
Another enhancement is that linter/formatter configuration, such as:

  • Directories in scope
  • Active and ignored rulesets

Is now defined in a single file, once, as opposed to being duplicated in Makefile, pre-commit config etc., which should streamline further code quality management by simplifying addition of rulesets, or directories in scope.

Note for reviewers

While the diff from this PR is quite big (72 files), most of that is very simple auto-fixes from ruff format that are slightly different from black. So reviewing should not be very hard.

Testing plan

Other tasks

astrojuanlu commented 1 month ago

🔥 Thank you @yury-fedotov for this PR!

rashidakanchwala commented 4 weeks ago

@yury-fedotov , feel free to merge this PR :)

yury-fedotov commented 4 weeks ago

@yury-fedotov , feel free to merge this PR :)

I don't have write access @rashidakanchwala

rashidakanchwala commented 4 weeks ago

no worries, let me merge. Once again Thank you!, this is big improvement to our dev workflow!