-
Notifications
You must be signed in to change notification settings - Fork 910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make source_dir
discoverable and document how to use this for non-standard project structure
#2962
Comments
source_dir
in pyproject.toml
as default and document how to use this for non-standard project structuresource_dir
discoverable and document how to use this for non-standard project structure
Ambivalent about this. After #2280 (comment) is complete, every Kedro project will be a standard Python library, so we can defer to standard source discovery mechanisms for this without the need of I would go as far as saying that we should deprecate it completely. |
Interesting, I am not aware of these discussion with
Maybe we also need to update the logic of kedro/kedro/framework/startup.py Line 37 in 5925b03
especially we want to enable If we are going to deprecate it, I think we need to have a clear plan. I assume this won't happened before 0.19, do you think we should at least document it? |
The root one is the one used by Kedro to store "build config" (using #2434 terminology), the one inside
Yeah that's the big question, we need to see if we can use native mechanisms to "discover" where the source is. My "let's deprecated |
Assume #2975 and #2926 is merged, which handle a breaking change for
What would be the alternative of |
Trying to sort my thoughts here without opening a can of worms. #2975 means that we would be moving to an Regardless of that change, setuptools (the backend we chose for starters) has always been able to locate the packages because we are relying on setuptools automatic package discovery https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#src-layout kedro/kedro/templates/project/{{ cookiecutter.repo_name }}/src/pyproject.toml Lines 10 to 11 in a6a5a4a
After we move to an
Hence the When I (hastily) wrote my message I thought that maybe there was a standard mechanism for package discovery. But it turns out it was left out of PEP 621 on purpose https://peps.python.org/pep-0621/#specify-files-to-include-when-building So, I only see two paths:
Maybe the best thing is to keep some redundancy and not do any dramatic changes for now. |
Sounds reasonable. I may prefer 1 since changing the default is rare. Keeping the option opens for Poetry or other thing is more important. So we can keep the scope of this ticket, maybe need to document |
Description
Related to #2553
We never document it clearly how to use
source_dir
. It's a misconception thatsrc
is a must for kedro-project.kedro/kedro/framework/startup.py
Lines 112 to 123 in 4563a4c
Context
Users misunderstood that
src
is a must for Kedro Project, it can be configured already but we never document it clearly.Possible Implementation
source_dir=src
topyproject.toml
by default to make this discoverable.Possible Alternatives
The text was updated successfully, but these errors were encountered: