Importing issues
There was a post on this topic, but I can't find it...
if I have a project with the following structure:
-- project
-- source_code
-- test_code
-- prefect_workflows
it appears to be a problem to use in the prefect flow a functions from the
source_code
folder, that have local imports, and that we need to create a python package in order to use local code.
is this correct or is there some way around it ?
z
Zanie
08/17/2021, 6:57 PM
Hey @YD you can also extend the
PYTHONPATH
to include your code folders, but using a python package is generally better practice.
k
Kevin Kho
08/17/2021, 7:09 PM
If you are using a Local agent, you can specify the
working_dir
path of your RunConfiguration. Docs .This will resolve those imports
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.