How do you import local files (.py files) into Snakemake files (.smk files)? I have the following example structure:
parent_dir
├── dir1
│ └── a.py
└── dir2
└── b.smk
I would like to import a.py
into b.smk
. I tried the following:
sys.path.insert(0, Path(__file__).parent.parent)
import dir1.a
but had no success. It results in a ModuleNotFoundError
. Is there a way around this? I do not want to change the extension of a.py
to .smk
.