truefoundry 0.4.4rc3__py3-none-any.whl → 0.4.4rc4__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 truefoundry might be problematic. Click here for more details.

@@ -107,16 +107,16 @@ def convert_deployment_config_to_python(workspace_fqn: str, application_spec: di
107
107
  Convert a deployment config to a python file that can be used to deploy to a workspace
108
108
  """
109
109
  application = Application.parse_obj(application_spec)
110
- application_type = application.__root__.type
111
-
110
+ application_obj = application.__root__
111
+ application_type = application_obj.type
112
112
  if (
113
- hasattr(application.__root__, "image")
114
- and application.__root__.image.type == "build"
115
- and application.__root__.image.build_source.type == "remote"
113
+ hasattr(application_obj, "image")
114
+ and application_obj.image.type == "build"
115
+ and application_obj.image.build_source.type == "remote"
116
116
  ):
117
- application.__root__.image.build_source = LocalSource(local_build=False)
117
+ application_obj.image.build_source = LocalSource(local_build=False)
118
118
 
119
- spec_repr = get_python_repr(application.__root__)
119
+ spec_repr = get_python_repr(application_obj)
120
120
  spec_repr = replace_enums_with_values(spec_repr)
121
121
  spec_repr = remove_none_type_fields(spec_repr)
122
122
  spec_repr = remove_type_field(spec_repr)
@@ -144,7 +144,8 @@ def convert_deployment_config_to_python(workspace_fqn: str, application_spec: di
144
144
  def generate_python_snippet_for_trigger_job(
145
145
  application_fqn: str, command: Optional[str], params: Optional[Dict[str, str]]
146
146
  ):
147
- job_run_python_template = """from truefoundry.deploy import trigger_job
147
+ job_run_python_template = """\
148
+ from truefoundry.deploy import trigger_job
148
149
 
149
150
  response = trigger_job(
150
151
  application_fqn="{{application_fqn}}",
@@ -160,16 +161,16 @@ print(response.jobRunName)
160
161
  )
161
162
 
162
163
  if command is not None:
163
- output_python_str = output_python_str.replace("{{command}}", repr(command))
164
164
  output_python_str = output_python_str.replace("# command", "command")
165
+ output_python_str = output_python_str.replace("{{command}}", repr(command))
165
166
  else:
166
167
  output_python_str = output_python_str.replace(
167
168
  "{{command}}", "<Enter Command Here>"
168
169
  )
169
170
 
170
171
  if params is not None:
171
- output_python_str = output_python_str.replace("{{params}}", repr(params))
172
172
  output_python_str = output_python_str.replace("# params", "params")
173
+ output_python_str = output_python_str.replace("{{params}}", repr(params))
173
174
  else:
174
175
  output_python_str = output_python_str.replace(
175
176
  "{{params}}", "<Enter Params(key-value pairs) here as python dict>"
@@ -195,7 +196,7 @@ def generate_curl_snippet_for_trigger_job(
195
196
  }'
196
197
  """
197
198
  output_curl_str = job_run_curl_request_template.replace(
198
- "{{control_plane_url}}", control_plane_url
199
+ "{{control_plane_url}}", control_plane_url.rstrip("/")
199
200
  )
200
201
  output_curl_str = output_curl_str.replace("{{application_id}}", application_id)
201
202
  output_curl_str = output_curl_str.replace(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.4.4rc3
3
+ Version: 0.4.4rc4
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhishek@truefoundry.com
@@ -107,7 +107,7 @@ truefoundry/deploy/lib/model/entity.py,sha256=fq8hvdJQgQn4uZqxpKrzmaoJhQG53_EbDo
107
107
  truefoundry/deploy/lib/session.py,sha256=Vg6rCA315T0yS0xG4ayJ84Ia_9ZfibH8utOSwPBMAmw,4953
108
108
  truefoundry/deploy/lib/util.py,sha256=3TapV7yczkheC1MMMfmJDGGzTl2l6e4jCYd_Rr5aoQ8,1330
109
109
  truefoundry/deploy/lib/win32.py,sha256=1RcvPTdlOAJ48rt8rCbE2Ufha2ztRqBAE9dueNXArrY,5009
110
- truefoundry/deploy/python_deploy_codegen.py,sha256=Fn2dgn_wcRigaR6Ia4pA7VdhWXaYl5D-o-K8P3953aA,6436
110
+ truefoundry/deploy/python_deploy_codegen.py,sha256=z9VSETb3Lrqn7sUD75EksbmA1vRiEl0LNnz9PTqF8ZM,6462
111
111
  truefoundry/deploy/v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
112
112
  truefoundry/deploy/v2/lib/__init__.py,sha256=WEiVMZXOVljzEE3tpGJil14liIn_PCDoACJ6b3tZ6sI,188
113
113
  truefoundry/deploy/v2/lib/deploy.py,sha256=HIcY3SzQ5lWl7avuuKi3J0Z-PBES6Sf4hgMK-m6_53U,11990
@@ -340,7 +340,7 @@ truefoundry/workflow/map_task.py,sha256=2m3qGXQ90k9LdS45q8dqCCECc3qr8t2m_LMCVd1m
340
340
  truefoundry/workflow/python_task.py,sha256=SRXRLC4vdBqGjhkwuaY39LEWN6iPCpJAuW17URRdWTY,1128
341
341
  truefoundry/workflow/task.py,sha256=ToitYiKcNzFCtOVQwz1W8sRjbR97eVS7vQBdbgUQtKg,1779
342
342
  truefoundry/workflow/workflow.py,sha256=WaTqUjhwfAXDWu4E5ehuwAxrCbDJkoAf1oWmR2E9Qy0,4575
343
- truefoundry-0.4.4rc3.dist-info/METADATA,sha256=C7iN6mFbrCfs3iLqyPq03a7Lu2QbqmiFwwiAc-G_qhc,3101
344
- truefoundry-0.4.4rc3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
345
- truefoundry-0.4.4rc3.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
346
- truefoundry-0.4.4rc3.dist-info/RECORD,,
343
+ truefoundry-0.4.4rc4.dist-info/METADATA,sha256=T4cv5lTsNJsCyFcnTteyq6edWIqNxcbXJ-d_ggHxL_o,3101
344
+ truefoundry-0.4.4rc4.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
345
+ truefoundry-0.4.4rc4.dist-info/entry_points.txt,sha256=TXvUxQkI6zmqJuycPsyxEIMr3oqfDjgrWj0m_9X12x4,95
346
+ truefoundry-0.4.4rc4.dist-info/RECORD,,