How do you guys solve this (I assume very common) problem?
I have a project with a few different functional units that I break into packages. I want to develop and test the packages one by one.
I end up with a structure something like
package
main.py
subpackage1/
module1.py
module1_functions/
module1_utils/
subpackage2/
module2.py
module2_functions/
module2_utils/```
If I structure the imports in module1.py as **import module1_functions.functions** then I can run module1.py to develop it. But it will break when I'm finished and want to run from main.py.
If I structure everything as **import subpackage1.module1_functions.functions** then I can run the finished version, but not the module alone. I have to add something like a test.py as a sibling to the main.py and have to click backwards and forwards between the file I'm actually editing and my test.py to develop.
What am I doing wrong?