I have split up a repository into three repositories. Two that will become end user tools and one repository with entities and other tools that will be used in the other two end repositories.
When I develop in Visual Studio Code i have the main repository (RoadTool) and the helper repository. But when I change code in my helper repository the App is not autoreloaded. Is there a setting to make the autoreload look into other repositories than the main repository?
Otherwise this is a new feature request
Hi Sjoerd,
Currently, the autoreload functionality only watches the files that are present in the my-app/app
directory. I am wondering how do you connect the repositories and how do they communicate?
Hi Kevin,
I have the following structure:
WegenTool (main repository)
Python.Shared (helper repository)
My idea is that for the Python.Shared we create a wheel which is than installed in the WegenTool. But publishing succesfully hasnโt been achieved yet, still waiting for a reply why it doesnโt work via de logs.
In VSC I add the shared entities and other code with the following function to add the code to sys.path.
def add_shared_packages_to_syspath():
if sys.platform == โwin32โ:
from pathlib import Path
sys.path.append(str(Path(file).parents[2] / โShared.Packagesโ))
If you know a better why to do this please let me know? It would be a great feature if the autoreload could work for additional repositories!
Hi Sjoerd,
I think in this case you want to use a Git submodule (Git - Submodules). As Kevin mentioned the autoreload functionality watches files in my-app/app
, so you will need to include the submodule in that directory. This is also required when you publish your app. So you will have something like this:
my-app
โโโ app
โ โโโ submodule
โโโ requirements.txt
Your solution, where you add a directory outside the app folder to the path, only works on your machine. If you publish your app, the helper repository is not uploaded as it is not part of the app folder.
Regards,
Raoul
Hello Raoul,
The Submodule works as a charm! I had heard of it before, but never used it. Thanks!
Regards,
Sjoerd