Hello all! I am new to Kedro and I was wondering w...
# questions
g
Hello all! I am new to Kedro and I was wondering what were the reasons behind the dependency management being handled with pip (+ requirements.txt and pip-compile to get a lock file) vs poetry. It seems to me poetry is becoming a standard in python dependency management and packaging. Anyone has an idea on this?
n
Hi! Kedro was started few years back, pip is at the time the standard. Requirements are mostly move to pyproject.toml now as this is more a standard (backed by a PEP and most package manager implement it). You may notice requirements.txt still exist because of some compatibility problem, I do expect it will disappear in the future.
As far as I know, poetry is far from being a standard nor any other package manager. There are pdm, hatch etc, if anything the ecosystem is more fragmented than it used to be. Pip still works fine so there isnt strong motivation to buy in for a particular one. There are some frictions working with poetry with a typical kedro new workflow which is documented in https://github.com/kedro-org/kedro/issues/681
d
In addition to what @Nok Lam Chan already said, Kedro aims to be easy to get into for new users. pip is the starting point for most people. Kedro doesn't prevent you in any way from using other alternatives.
It seems to me poetry is becoming a standard in python dependency management and packaging.
I was going to say, I disagree, but @Nok Lam Chan just beat me to it. 😄
😄 2
n
To name a few more… uv (venv), pixi, conda, mamba
g
Thanks @Nok Lam Chan! I understand your points and I did not mean it was already a standard in that sense. I guess, it's just that within my working environment it's fairly rare to see a newly started python project using pure pip + requirements.txt like what you get when you do
kedro new
. In practice, I often see project started with indeed conda, poetry, and pixi when it's cross-platform.
j
I agree Poetry will sadly not become a standard, because it's not standards-compliant. uv/rye will probably be that though. still, we're very barebones in Kedro and, as you saw, we basically provide a plain
requirements.txt
Kedro is poetry-compatible:
g
Thanks @Juan Luis! I just read a bit about kedro starters today. If I wanted to create my own project template using poetry would I need to create my own?
j
@Guillaume Tauzin yes - at the moment I haven’t seen any community-contributed Kedro + poetry starters
creating a custom starter is described in the docs:
g
Thanks @Juan Luis!
🙌🏼 1
Hi all, just a comment on a related topic. I just noticed that the website "Features" page does not seem up-to-date. Section 05 "Coding Standards" mentions that the kedro template uses flake8, isort, and black but seems like the newer version of kedro just uses ruff.
j
👀 thanks a lot for flagging! opening an issue for our website
👍 1