Ok, I found a solution for handling per project external dependencies with the existing script component! I’d be very interested if other people have cleaner solutions to this.
This approach is based on this thread
Where “Path Script” is:
import os
scriptPath = os.path.join("..", "gh_script_inc", "externalScript1.py")
and “External Script” is in a file on the file system as:
x: int
result: float
result = x * 1.5
print(f"{result=}")
I’ve also verified that the external script can use this notation for installing dependencies, like so:
#! python3
#r: pandas
While this does achieve my goal, I’d be curious about other people’s improvements on this. Is there a better way to refresh the external code? Is there a better system independent way of creating the path to the external script?