prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Possibly add support for installing a module from a git repo in `Git` storage

Open jcrist opened this issue 4 years ago • 1 comments

The new Git storage class adds support for cloning a full git repo locally, then running a flow contained in that repo. This currently only works for flows stored in files in the repo, not flows stored in some larger module within the repo (the distinction here being whether you import the flow as from mymodule.submodule import myflow, or run it as python some/path/to/flow.py).

The best way to handle this is probably a post-clone hook, where an arbitrary shell script can be run after the repo is cloned, but before the flow is loaded. This script would be run with the repo root as the working directory. An example script might be as simple as

# install the repo
pip install .

but could be used by the user to do arbitrary things as needed. No thoughts on what the kwarg name would be.

jcrist avatar May 24 '21 20:05 jcrist

Related to #4328.

jcrist avatar May 24 '21 20:05 jcrist