m3dev / gokart

Gokart solves reproducibility, task dependencies, constraints of good code, and ease of use for Machine Learning Pipeline.
https://gokart.readthedocs.io/en/latest/
MIT License
305 stars 57 forks source link

introduce Ruff as linter #345

Closed hirosassa closed 8 months ago

hirosassa commented 8 months ago

What I did in this PR

related to https://github.com/m3dev/gokart/issues/344

I introduce ruff as linter. I replaced flake8 and isort to simplify the configuration.

What I did not do

Replacing yapf with ruff is next task.

yokomotod commented 8 months ago

@hirosassa Great! Can you compare exection time?

hirosassa commented 8 months ago

@yokomotod In my local PC, using tox command, it shows about 46 times faster!! ⚡️

# ruff
ruff: OK (0.06=setup[0.01]+cmd[0.06] seconds)

# flake8 + isort
isort: OK (1.06=setup[0.32]+cmd[0.74] seconds)
flake8: OK (2.16=setup[0.22]+cmd[1.94] seconds)
hirosassa commented 8 months ago

@yokomotod All of your suggestions are fixed! plz check.