hello, my current folder structure is `actual_root...
# questions
t
hello, my current folder structure is
actual_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 you
n
Can you do a
tree
command to show how your folder structured?
Noted in 0.19.x we make some improvements and move the
pyproject.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.
You may want to read how
pytest
import modules - https://docs.pytest.org/en/7.1.x/explanation/pythonpath.html
Most likely you need to update these 2 config to make things first.
[tool.setuptools.packages.find]
- to make pytest know where to find the module `[tool.kedro]`'s
source_dir
👍 1