is there a way to skip a directory when registerin...
# prefect-server
l
is there a way to skip a directory when registering flows with the prefect cli?
k
Not specifically…but can’t you point it to the subdirectories instead if that is the case?
l
i have a flows directory that gets registered and there’s one subdirectory in there that i’d like to not be registered in a specific environment. by default we register all flows in staging and then in production but this subset of flows should only exist in prod 😕
so the alternative would be specifying the rest of the subdirectories which is a hassle… maybe i’m better off just moving that special set of a flows to a different directory
k
I think it takes a glob so maybe if you just prefixed it differently and then you can use a wildcard
Copy code
prefect register --project my-project --path "others-*"
l
i played around a little and you can exclude patterns like this with glob:
Copy code
prefect register --project my-project --path "lib/flows/[!pattern]*/*.py"
^ this will register all python files in
lib/flows
subdirectories except for
pattern
thanks!
k
Ah nice!