truefoundry 0.10.4rc3__py3-none-any.whl → 0.10.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.

@@ -2,7 +2,7 @@ import ast
2
2
  import io
3
3
  import json
4
4
  import re
5
- from typing import Any, Dict, List, Optional
5
+ from typing import Any, Callable, Dict, List, Optional
6
6
 
7
7
  from rich.console import Console
8
8
  from rich.pretty import pprint
@@ -143,9 +143,14 @@ def _convert_deployment_config_to_python(workspace_fqn: str, application_spec: d
143
143
  return generated_code
144
144
 
145
145
 
146
+ def _default_exclude_fn(model: BaseModel, name: str) -> bool:
147
+ return False
148
+
149
+
146
150
  def convert_deployment_config_to_python(
147
151
  workspace_fqn: str,
148
152
  application_spec: Dict[str, Any],
153
+ exclude_fn: Callable[[BaseModel, str], bool] = _default_exclude_fn,
149
154
  exclude_unset: bool = False,
150
155
  exclude_defaults: bool = False,
151
156
  ):
@@ -156,11 +161,13 @@ def convert_deployment_config_to_python(
156
161
  pairs = []
157
162
  for name, value in original_repr_args(self):
158
163
  if name is not None:
159
- model_field = self.__fields__.get(name)
160
- if model_field is None:
164
+ if exclude_fn(self, name):
161
165
  continue
162
166
  if exclude_unset and name not in self.__fields_set__:
163
167
  continue
168
+ model_field = self.__fields__.get(name)
169
+ if model_field is None:
170
+ continue
164
171
  if (
165
172
  exclude_defaults
166
173
  and not getattr(model_field, "required", True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: truefoundry
3
- Version: 0.10.4rc3
3
+ Version: 0.10.4rc4
4
4
  Summary: TrueFoundry CLI
5
5
  Author-email: TrueFoundry Team <abhishek@truefoundry.com>
6
6
  Requires-Python: <3.14,>=3.8.1
@@ -53,7 +53,7 @@ truefoundry/common/types.py,sha256=BMJFCsR1lPJAw66IQBSvLyV4I6o_x5oj78gVsUa9si8,1
53
53
  truefoundry/common/utils.py,sha256=j3QP0uOsaGD_VmDDR68JTwoYE1okkAq6OqpVkzVf48Q,6424
54
54
  truefoundry/common/warnings.py,sha256=rs6BHwk7imQYedo07iwh3TWEOywAR3Lqhj0AY4khByg,504
55
55
  truefoundry/deploy/__init__.py,sha256=2GNbI8IGJBotz_IKaqQ-DWYWZn_pSu7lN7aId15Gk7Q,2799
56
- truefoundry/deploy/python_deploy_codegen.py,sha256=X6cSGQ9_9GxrgIlTLvBWMDz9QnU7hrxieMIutNJe_ng,7784
56
+ truefoundry/deploy/python_deploy_codegen.py,sha256=k19_m5DGsUyjOUCSKwIVP8vDna2sq01tHABsUfoVpW4,8019
57
57
  truefoundry/deploy/_autogen/models.py,sha256=xt-DuaRDx5jeRwyGoQH2yyPZAep9Q2MHFW9XBuRzG8E,73161
58
58
  truefoundry/deploy/builder/__init__.py,sha256=kgvlkVkiWpMVdim81tIeLrdoACqrFDgwCqHdQVsCsMo,4988
59
59
  truefoundry/deploy/builder/constants.py,sha256=amUkHoHvVKzGv0v_knfiioRuKiJM0V0xW0diERgWiI0,508
@@ -381,7 +381,7 @@ truefoundry/workflow/remote_filesystem/__init__.py,sha256=LQ95ViEjJ7Ts4JcCGOxMPs
381
381
  truefoundry/workflow/remote_filesystem/logger.py,sha256=em2l7D6sw7xTLDP0kQSLpgfRRCLpN14Qw85TN7ujQcE,1022
382
382
  truefoundry/workflow/remote_filesystem/tfy_signed_url_client.py,sha256=xcT0wQmQlgzcj0nP3tJopyFSVWT1uv3nhiTIuwfXYeg,12342
383
383
  truefoundry/workflow/remote_filesystem/tfy_signed_url_fs.py,sha256=nSGPZu0Gyd_jz0KsEE-7w_BmnTD8CVF1S8cUJoxaCbc,13305
384
- truefoundry-0.10.4rc3.dist-info/METADATA,sha256=DvsgKrey42e5PHmRKl107ZHQeOO-uqsRX-OG7tibhiI,2508
385
- truefoundry-0.10.4rc3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
386
- truefoundry-0.10.4rc3.dist-info/entry_points.txt,sha256=xVjn7RMN-MW2-9f7YU-bBdlZSvvrwzhpX1zmmRmsNPU,98
387
- truefoundry-0.10.4rc3.dist-info/RECORD,,
384
+ truefoundry-0.10.4rc4.dist-info/METADATA,sha256=5AJCpFRmPJFEZb9YerIsMFvC5Dq_Sr3YJPJlh3Ea3IQ,2508
385
+ truefoundry-0.10.4rc4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
386
+ truefoundry-0.10.4rc4.dist-info/entry_points.txt,sha256=xVjn7RMN-MW2-9f7YU-bBdlZSvvrwzhpX1zmmRmsNPU,98
387
+ truefoundry-0.10.4rc4.dist-info/RECORD,,