https://kedro.org/ logo
#random
Title
# random
n

Nok Lam Chan

06/02/2023, 12:43 PM
I am sure @Juan Luis has an opinion about this ๐Ÿ”ฅ
๐ŸŒถ๏ธ 1
๐Ÿ”ฅ 1
j

Juan Luis

06/02/2023, 12:46 PM
LOL
co-sign
n

Nok Lam Chan

06/02/2023, 1:05 PM
Interesting idea, not sure if I like it.
pipx
basically install things like
black
in a global environment (not core dependency), so you installed it once, then have your project dependencies in isolated environment.
j

Juan Luis

06/02/2023, 1:06 PM
yep, I'm a big fan of
pipx
! I use it for linters,
docker-compose
, stuff like that
n

Nok Lam Chan

06/02/2023, 1:08 PM
I imagine it works well for development, unsure how well does it integrate with things like
pre-commit
that comes with its own virtualenv. May end up running different version of linter in CI and your local?
j

Juan Luis

06/02/2023, 1:08 PM
yeah pre-commit does its own thing I think
n

Nok Lam Chan

06/02/2023, 1:08 PM
btw people have so many questions about Python Packaging๐Ÿ˜‚
j

Juan Luis

06/02/2023, 1:08 PM
you're right, since I started using pre-commit I haven't used pipx much
hahaha of course, it's a hot topic, always ๐Ÿ˜‚
n

Nok Lam Chan

06/02/2023, 1:10 PM
canva.live - join the party if you want๐Ÿคฃ Code: 153608
On the other hand, I really want to replace pylint,isort,flake8 with ruff if it covers everything
j

Juan Luis

06/02/2023, 1:14 PM
wow! it's amazing, I get the same questions everytime I touch pip or conda during a training ๐Ÿ˜„
On the other hand, I really want to replace pylint,isort,flake8 with ruff if it covers everything
1000 I'm keeping an eye on their issue tracker to see when they release a 0.1.0 version
m

Matthias Roels

06/02/2023, 1:24 PM
Never used pipx, but I really like ruff! The first time I tried it, I instantly replaced pylint with it and never looked back. Itโ€™s just so unbelievably fast ๐Ÿ˜ฑ. When no issues are found, itโ€™s as if it never ran at all. Plus the
โ€”fix
option is so nice! I run it in VSCode on save and it just frees up so much of my time to focus on logic instead of linting.
ultrafastparrot 1
n

Nok Lam Chan

06/02/2023, 1:25 PM
What does the
-fix
option does? pylint is the slowest linter among the rest, it makes my commit takes more than 2 minutes with pre-commit
flake8
doesn't support
pyproject.toml
, another motivation to remove it!
this 1
j

Juan Luis

06/02/2023, 1:29 PM
I think
-fix
is essentially the autoformatting part right? isort + black + ...
the creator of Black endorses this effort by the way! https://github.com/charliermarsh/ruff/issues/1904#issuecomment-1470946322
n

Nok Lam Chan

06/02/2023, 1:35 PM
image.png
๐Ÿคฃ 2
๐ŸงŒ 1
m

Matthias Roels

06/02/2023, 1:57 PM
The fix options allows you to fix certain violations against rules. It goes beyond isort and formatting!
๐Ÿ”ฅ 1
n

Nok Lam Chan

06/02/2023, 3:31 PM
Stupid question, how do you configure
ruff
that sort imports? @Matthias Roels What's the configuration?
Ah, I figured out I need to do --SELECT=["I"] to include isort rules
๐Ÿ‘ 1