Hello, I am trying to integrate Kedro with our com...
# questions
a
Hello, I am trying to integrate Kedro with our company's folder structure. Is it possible to remove
<package_name>
from the
src
folder? i.e. the following tree
Copy code
.
├── README.md
├── conf
│   ├── ...
├── data
│   ├── ...
├── pyproject.toml
└── src
    ├── ...
    ├── pipelines
n
I think you may want to move everything out from src to the root instead of removing package name
You still need it because the import is gonna be from package name.a.b.c
a
Hi Nok, thanks for your reply. The link you provided is different from what I want to achieve. I want to keep
src
but remove the package name directory. For example, I currently have the following structure in my test project:
Copy code
.
├── README.md
├── conf
│   ├── ...
├── data
│   ├── ...
├── pyproject.toml
└── iris
    ├── ...
    ├── pipelines
and in the
pyproject.toml
I modified
source_dir = "."
so the current set up works as is. What I would like to achieve is to rename
iris
to
src
. Is this possible?
j
@Alicia Yen you can do it, but then you’d need to import your code as
from src.pipelines import …
is that what you want?
a
@Juan Luis - Yes, that is what I want. What else do I need to change in the
pyrproject.toml
to make this change? Thanks for your help
j
after you've done
source_dir = ""
, try replacing
<package_name>
with
src
in
pyproject.toml
, for example in
[project].name
,
[tool.kedro].package_name
, and possibly others
thankyou 1