I am using a pretty common project structure with python packages at the top level of the containing directory and subdirectories named scripts and tests. Generally what you want with this setup is for the top level folder to be added to sys.path so that you can just say import mypackage in your scripts and tests.
I found that I had to use two different mechanisms, - adding a .env file to set PYTHONPATH for the tests and linting etc. and setting the terminal.integrated.env.windows for the terminal.
However neither of these seem to affect the Python Interactive window, so if I define a cell using #%% in a script (not a notebook) and run it with Ctrl-Enter, then it wont be able to find my packages located at the root of the project dir.
Is there a way to achieve what I want without changing my source files? Ideally there would be one way of setting the import path that works everywhere without having to specify an absolute path as in the case of the .env file. Spyder for example can do this with its PYTHONPATH manager and adds the root directory of projects by default.