ob-metaflow 2.10.1.6__py2.py3-none-any.whl → 2.10.2.6__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of ob-metaflow might be problematic. Click here for more details.

@@ -52,28 +52,15 @@ class ArgoClient(object):
52
52
  json.loads(e.body)["message"] if e.body is not None else e.reason
53
53
  )
54
54
 
55
- def get_workflow_templates(self, flow_name=None):
56
- """
57
- Return a list of workflow template names for a given Flow name.
58
- Returns all workflow template names if no name is provided
59
- """
55
+ def get_workflow_templates(self):
60
56
  client = self._client.get()
61
57
  try:
62
- results = client.CustomObjectsApi().list_namespaced_custom_object(
58
+ return client.CustomObjectsApi().list_namespaced_custom_object(
63
59
  group=self._group,
64
60
  version=self._version,
65
61
  namespace=self._namespace,
66
62
  plural="workflowtemplates",
67
63
  )["items"]
68
- return [
69
- result["metadata"]["name"]
70
- for result in results
71
- if flow_name is None
72
- or flow_name
73
- == result["metadata"]
74
- .get("annotations", {})
75
- .get("metaflow/flow_name", None)
76
- ]
77
64
  except client.rest.ApiException as e:
78
65
  if e.status == 404:
79
66
  return None
@@ -187,13 +187,19 @@ class ArgoWorkflows(object):
187
187
  def list_templates(flow_name, all=False):
188
188
  client = ArgoClient(namespace=KUBERNETES_NAMESPACE)
189
189
 
190
- search = None if all else flow_name
191
- results = client.get_workflow_templates(search)
192
- if results is None:
190
+ templates = client.get_workflow_templates()
191
+ if templates is None:
193
192
  return []
194
193
 
195
- template_names = [template_name for template_name in results]
196
-
194
+ template_names = [
195
+ template["metadata"]["name"]
196
+ for template in templates
197
+ if all
198
+ or flow_name
199
+ == template["metadata"]
200
+ .get("annotations", {})
201
+ .get("metaflow/flow_name", None)
202
+ ]
197
203
  return template_names
198
204
 
199
205
  @staticmethod
@@ -842,10 +842,10 @@ def terminate(obj, run_id, authorize=None):
842
842
  help="list all Argo Workflow Templates (not just limited to this flow)",
843
843
  )
844
844
  @click.pass_obj
845
- def list_templates(obj, all=None):
845
+ def list_workflow_templates(obj, all=None):
846
846
  templates = ArgoWorkflows.list_templates(obj.flow.name, all)
847
847
  for template_name in templates:
848
- obj.echo(template_name)
848
+ obj.echo_always(template_name)
849
849
 
850
850
 
851
851
  def validate_run_id(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ob-metaflow
3
- Version: 2.10.1.6
3
+ Version: 2.10.2.6
4
4
  Summary: Metaflow: More Data Science, Less Engineering
5
5
  Author: Netflix, Outerbounds & the Metaflow Community
6
6
  Author-email: help@outerbounds.co
@@ -144,10 +144,10 @@ metaflow/plugins/airflow/sensors/base_sensor.py,sha256=lgbd9JjfDBjDRT8-oEnPnFNst
144
144
  metaflow/plugins/airflow/sensors/external_task_sensor.py,sha256=GAWfc2GJqSSAKOJyHSdMea1-tu1cLgEWlRIfe3fti3Y,6048
145
145
  metaflow/plugins/airflow/sensors/s3_sensor.py,sha256=zym4mUm_f_gBsvHHVqGtX_OOxRjM3WG217gaT-XDBnk,3274
146
146
  metaflow/plugins/argo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
- metaflow/plugins/argo/argo_client.py,sha256=hpUKrYDFTRO4TqMy6OX4u6Vy6xUOjOXzzC9OSAxcbQs,16346
147
+ metaflow/plugins/argo/argo_client.py,sha256=lkVfUuH4rT1ONBvPRWZwQoMDUphHitFxCYWdXRU3zZY,15855
148
148
  metaflow/plugins/argo/argo_events.py,sha256=Pt5L7DhxxWMES81JS8kCh4Al4w7k-uKeH99FChBPp1o,6002
149
- metaflow/plugins/argo/argo_workflows.py,sha256=cp1hEUSzRut6Zeyg6IcVOFEDpba1ZHny4mdjiqmg73w,115971
150
- metaflow/plugins/argo/argo_workflows_cli.py,sha256=hP2trNZoiw0oGUVDsIr7hxUzdPltHXpvpJasYa2xyOc,32334
149
+ metaflow/plugins/argo/argo_workflows.py,sha256=tr00xdYl_TTT8J0E1q3SnNpREAClyz7ZJIcTjhyRKlw,116131
150
+ metaflow/plugins/argo/argo_workflows_cli.py,sha256=oXCSU6TdkF-ptQTXux_W2KAwL-LMJjpMvoxLG9Et0o8,32350
151
151
  metaflow/plugins/argo/argo_workflows_decorator.py,sha256=CfKVoHCOsCCQMghhPE30xw15gacwp3hR23HCo9ZZFVg,6580
152
152
  metaflow/plugins/argo/process_input_paths.py,sha256=4SiUoxbnTX4rCt0RSLcxG5jysbyd8oU-5JT0UOgy-vk,555
153
153
  metaflow/plugins/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -289,9 +289,9 @@ metaflow/tutorials/07-worldview/README.md,sha256=5vQTrFqulJ7rWN6r20dhot9lI2sVj9W
289
289
  metaflow/tutorials/07-worldview/worldview.ipynb,sha256=ztPZPI9BXxvW1QdS2Tfe7LBuVzvFvv0AToDnsDJhLdE,2237
290
290
  metaflow/tutorials/08-autopilot/README.md,sha256=GnePFp_q76jPs991lMUqfIIh5zSorIeWznyiUxzeUVE,1039
291
291
  metaflow/tutorials/08-autopilot/autopilot.ipynb,sha256=DQoJlILV7Mq9vfPBGW-QV_kNhWPjS5n6SJLqePjFYLY,3191
292
- ob_metaflow-2.10.1.6.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
293
- ob_metaflow-2.10.1.6.dist-info/METADATA,sha256=rRy0R2xJQWdXHgwR7Ud4641M-SswA12GdPz7PP8VWIM,5061
294
- ob_metaflow-2.10.1.6.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
295
- ob_metaflow-2.10.1.6.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
296
- ob_metaflow-2.10.1.6.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
297
- ob_metaflow-2.10.1.6.dist-info/RECORD,,
292
+ ob_metaflow-2.10.2.6.dist-info/LICENSE,sha256=nl_Lt5v9VvJ-5lWJDT4ddKAG-VZ-2IaLmbzpgYDz2hU,11343
293
+ ob_metaflow-2.10.2.6.dist-info/METADATA,sha256=wG48Bi6r3Exgd1JZcPs3N79aZSu6FjjuajiQfAMBQ0k,5061
294
+ ob_metaflow-2.10.2.6.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
295
+ ob_metaflow-2.10.2.6.dist-info/entry_points.txt,sha256=IKwTN1T3I5eJL3uo_vnkyxVffcgnRdFbKwlghZfn27k,57
296
+ ob_metaflow-2.10.2.6.dist-info/top_level.txt,sha256=v1pDHoWaSaKeuc5fKTRSfsXCKSdW1zvNVmvA-i0if3o,9
297
+ ob_metaflow-2.10.2.6.dist-info/RECORD,,