fmfreeze05/02/2023, 5:22 PM
Deepyaman Datta05/02/2023, 5:27 PM
folder under there I think~.
Juan Luis05/02/2023, 5:29 PM
would remain untouched, and as long as there's a
, everything should be fine? but I might be missing things
. but maybe it shouldn't have to be that way 🤔
, it turns out!
fmfreeze05/02/2023, 5:38 PM
Deepyaman Datta05/02/2023, 5:46 PM
You can configure the source directory location, but it is still going to require aI misspoke on this/misread the code; it will default tofolder under there I think.
isn't provided, but you should be able to override it.
But when it comes to kedro-viz, things might get even trickier?!I don't think Kedro-Viz will be any worse; it basically also delegates the context-loading to
, so as long as that works, you could be fine.
Juan Luis05/02/2023, 5:48 PM
this moves you from a
--- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [tool.kedro] package_name = "spaceflights" project_name = "Spaceflights" +source_dir = "spaceflights" kedro_init_version = "0.18.8" [tool.isort]
layout to a "flat" layout (instead of
, you'd have
fmfreeze05/03/2023, 2:38 PM
Juan Luis05/03/2023, 2:40 PM
, hence having a
mv src/spaceflights/ .
directory at the root of the project. is that what you were attempting?
fmfreeze05/03/2023, 2:52 PM
ModuleNotFoundError: No module named spaceflights
Juan Luis05/03/2023, 3:22 PM
output? here's mine at the moment:
. ├── README.md ├── conf │ ├── ... ├── data │ ├── ... ├── pyproject.toml ├── setup.cfg └── spaceflights ├── __init__.py ├── __main__.py ├── __pycache__ ├── pipeline_registry.py ├── pipelines └── settings.py
fmfreeze05/03/2023, 3:43 PM
Juan Luis05/03/2023, 3:44 PM
for my tree above:
--- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,7 @@ [tool.kedro] package_name = "spaceflights" project_name = "Spaceflights" +source_dir = "." kedro_init_version = "0.18.8"
Kedro was looking in the wrong place - I'm not sure how I got it working yesterday)
source_dir = "spaceflights"
An ideal solution would be even more flexible to achieve a more granular structure.
E.g. having settings.py & pipeline_registry.py in it's own kedro subfolder.I agree it would be nice indeed. at the moment it's hardcoded: https://github.com/kedro-org/kedro/blob/2e70dec396567d2ba38456179aad0d4ae8e83b31/kedro/framework/project/__init__.py#L256-L259 would you want to open an issue about it @fmfreeze? (no guarantees about it, but at least might serve to spark broader discussion)
fmfreeze05/03/2023, 6:05 PM
Juan Luis05/03/2023, 6:18 PM
fmfreeze05/03/2023, 9:26 PM
Juan Luis05/03/2023, 9:48 PM
- so, to allow for the customization you proposed @fmfreeze, Kedro would need to make those lines more generic and allow for some configuration, similar to what
does. does this make sense?
fmfreeze05/16/2023, 8:35 AM
works also nice. 👍
Juan Luis05/16/2023, 11:57 AM