kedro-org / kedro

Kedro is a toolbox for production-ready data science. It uses software engineering best practices to help you create data engineering and data science pipelines that are reproducible, maintainable, and modular.
https://kedro.org
Apache License 2.0
9.88k stars 893 forks source link

Create a plugin for `ruff`/`flake8` that would check for bad practices specific to Kedro #3849

Closed yury-fedotov closed 5 months ago

yury-fedotov commented 5 months ago

Description

Came up with a random idea today, wanted to run by you.

Would a Kedro-related plugin for flake8 or ruff be a thing in your opinion? And have you heard of something like that existing?

Some ideas for rulesets to check are:

Context

I think this can simplify collaboration in large projects and help encourage proper usage of Kedro concepts.

Possible Implementation

Check how other plugins are made and implement something similar. There are tens of rulesets defined for ruff and hundreds (if not thousands?) plugins for flake8, I'm sure there are good reference examples.

For example, this is a flake8 plugin that implements a ton of custom rules.

Possible Alternatives

Do not do it :)