File tree Expand file tree Collapse file tree
pangeo_forge_runner/commands Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ def start(self):
261261
262262 # if pangeo-forge-recipes is <=0.9, we have to specify a requirements.txt
263263 # file even if it isn't present, as the image used otherwise will not have pangeo-forge-recipes
264- if isinstance (recipe , PTransform ):
264+ if isinstance (recipe , PTransform ) or callable ( recipe ) :
265265 requirements_path = feedstock .feedstock_dir / "requirements.txt"
266266 if requirements_path .exists ():
267267 extra_options ["requirements_file" ] = str (requirements_path )
@@ -283,7 +283,9 @@ def start(self):
283283 # Chain our recipe to the pipeline. This mutates the `pipeline` object!
284284 # We expect `recipe` to either be a beam PTransform, or an object with a 'to_beam'
285285 # method that returns a transform.
286- if isinstance (recipe , PTransform ):
286+ if callable (recipe ):
287+ recipe (pipeline )
288+ elif isinstance (recipe , PTransform ):
287289 # This means we are in pangeo-forge-recipes >=0.9
288290 pipeline | recipe
289291 elif hasattr (recipe , "to_beam" ):
You can’t perform that action at this time.
0 commit comments