Hi-- new to Kedro. Why is there a `pyproject.toml...
# questions
c
Hi-- new to Kedro. Why is there a
pyproject.toml
file in the root project directory and then a separate
setup.py
in the
src
directory? Trying to understand their separate roles. I'd like to introduce
kedro
to my team at work. We use a custom cookiecutter to setup all of our projects so that they're pip-installable across various platforms. Our current update uses only
pyproject.toml
, and we've removed last remnants of
setup.py
and
setup.cfg
. Specifically, I'm trying to understand how I could structure a custom starter, incorporating our existing cookiecutter, that would allow for editable installs with extras-- but I don't want to disturb any existing kedro functionality. How does the kedro cli use the
src/setup.py
file, if at all; same with the
pyproject.toml
in the root folder
d
TBH I'm not sure why it can't all be migrated to
pyproject.toml
at this point; probably just something that hasn't gotten done since it's been almost a year since
setuptools
added support for
pyproject.toml
-based configuration. Just like Kedro itself hasn't moved yet. 🙈 Related discussion: https://github.com/kedro-org/kedro/issues/2152#issuecomment-1410028179 As for how
src/setup.py
is used, it's what's used if you try to package the Kedro project (e.g. using
kedro package
).
Update: @Juan Luis pointed out that it's being tracked in https://github.com/kedro-org/kedro/issues/2280 already, so hopefully Kedro projects will by default not use
setup.py
#soon 🤞
f
@Chris Santiago Good question! While I am not focused on the setup.py (yet) I have a similar situation as you described: In my company we already have our own cookiecutter template resp. folder structure and naming conventions. I am struggling integrating kedro capabilities into our existing template. E.g. we don't follow the "src" naming convention but "<pkg_name>". How can I configure kedro so it knows about that and looks e.g. for the kedro_cli.py in there? So to wrap up: what is best practice to configure kedro to integrate well into an existing repo structure without loosing kedro functionality?