broad-doctor-18421
10/19/2023, 2:18 PMPython
, and Mono repo's, with relative imports
from component folders... what a mouthful! It doesn't seem to work.
There is some talk on github issues but it doesn't seem like this works.
./src
|_./lib/__init__.py
|_./lib/autotag.py
|_./infra/__main__.py
and in infra: from lib.autotag import register_auto_tags
we get an error with cd infra; pulumi up
ModuleNotFoundError: No module named 'lib'
This could be more of a python thing but as mono repos are one recommended repo structure, I thought someone might have insight here?billowy-army-68599
infra
folder?
./src
|_./infra/__main__.py
|_./infra/lib/__init__.py
|_./infra/lib/autotag.py
It looks to me like that’s not the right import pathbroad-doctor-18421
10/19/2023, 2:22 PM./vpc/
./app1/
./app2/
./components/auto_scaling/...
./components/eventing/...
billowy-army-68599
../lib/autotag
in that caseimport sys
sys.path.append("..")
broad-doctor-18421
10/19/2023, 2:26 PM