Timothy Chan
01/15/2024, 10:25 AMactual_root_folder > kedro_project > src > kedro_package
(simplified)
kedro_project is the root for the kedro project, i.e. kedro
run from there. it is one layer after the actual root folder
i remove the kedro_project layer and migrated all files within kedro_project to actual_root_folder. this is to have actual_root_folder as both the kedro root folder and actual root folder.
actual_root_folder > src > kedro_package
i can then do kedro run
from actual_root_folder. however i am unable to do pytest as the folder structure and root directory has changed. is there anything i need to set, for example in the pyproject.toml
files, so that pytest (actual_root_folder > src > tests > ...)
can import files from kedro_package
as before and run?
thank youNok Lam Chan
01/15/2024, 12:11 PMtree
command to show how your folder structured?Nok Lam Chan
01/15/2024, 12:12 PMNok Lam Chan
01/15/2024, 12:15 PMpyproject.toml
. So If you have a project folder which contains a kedro project and some other module, you could combined them as a single package if desired.Nok Lam Chan
01/15/2024, 12:16 PMpytest
import modules - https://docs.pytest.org/en/7.1.x/explanation/pythonpath.htmlNok Lam Chan
01/15/2024, 12:19 PM[tool.setuptools.packages.find]
- to make pytest know where to find the module
`[tool.kedro]`'s source_dir