truefoundry 0.3.0rc14__tar.gz → 0.3.1__tar.gz

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.

Files changed (135) hide show
  1. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/PKG-INFO +1 -1
  2. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/pyproject.toml +1 -1
  3. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/util.py +43 -6
  4. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/exceptions.py +7 -4
  5. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/lib/deploy.py +10 -3
  6. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/README.md +0 -0
  7. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/__init__.py +0 -0
  8. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/__init__.py +0 -0
  9. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/agents/__init__.py +0 -0
  10. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/agents/base.py +0 -0
  11. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/agents/developer.py +0 -0
  12. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/agents/project_identifier.py +0 -0
  13. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/agents/tester.py +0 -0
  14. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/cli.py +0 -0
  15. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/constants.py +0 -0
  16. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/exception.py +0 -0
  17. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/logger.py +0 -0
  18. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/__init__.py +0 -0
  19. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/ask.py +0 -0
  20. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/base.py +0 -0
  21. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/commit.py +0 -0
  22. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/docker_build.py +0 -0
  23. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/docker_run.py +0 -0
  24. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
  25. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/list_files.py +0 -0
  26. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/read_file.py +0 -0
  27. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/send_request.py +0 -0
  28. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/tools/write_file.py +0 -0
  29. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/utils/client.py +0 -0
  30. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/utils/diff.py +0 -0
  31. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
  32. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/cli/__init__.py +0 -0
  33. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/cli/__main__.py +0 -0
  34. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/__init__.py +0 -0
  35. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/auto_gen/models.py +0 -0
  36. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/__init__.py +0 -0
  37. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/builders/__init__.py +0 -0
  38. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/builders/dockerfile.py +0 -0
  39. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +0 -0
  40. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +0 -0
  41. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +0 -0
  42. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +0 -0
  43. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/builder/docker_service.py +0 -0
  44. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/__init__.py +0 -0
  45. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/cli.py +0 -0
  46. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/__init__.py +0 -0
  47. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/apply_command.py +0 -0
  48. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/build_command.py +0 -0
  49. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/build_logs_command.py +0 -0
  50. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/create_command.py +0 -0
  51. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/delete_command.py +0 -0
  52. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/deploy_command.py +0 -0
  53. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/get_command.py +0 -0
  54. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/list_command.py +0 -0
  55. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/login_command.py +0 -0
  56. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/logout_command.py +0 -0
  57. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/logs_command.py +0 -0
  58. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/patch_application_command.py +0 -0
  59. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/patch_command.py +0 -0
  60. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/redeploy_command.py +0 -0
  61. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/terminate_comand.py +0 -0
  62. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/commands/trigger_command.py +0 -0
  63. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/config.py +0 -0
  64. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/console.py +0 -0
  65. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/const.py +0 -0
  66. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/cli/display_util.py +0 -0
  67. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/core/__init__.py +0 -0
  68. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/core/login.py +0 -0
  69. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/core/logout.py +0 -0
  70. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/__init__.py +0 -0
  71. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/__main__.py +0 -0
  72. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/app.py +0 -0
  73. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/build.py +0 -0
  74. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/remote/__init__.py +0 -0
  75. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/remote/context.py +0 -0
  76. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/remote/method.py +0 -0
  77. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/remote/remote.py +0 -0
  78. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/route.py +0 -0
  79. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/service.py +0 -0
  80. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/function_service/utils.py +0 -0
  81. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/io/__init__.py +0 -0
  82. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/io/output_callback.py +0 -0
  83. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/io/rich_output_callback.py +0 -0
  84. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/json_util.py +0 -0
  85. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/__init__.py +0 -0
  86. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/auth/auth_service_client.py +0 -0
  87. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/auth/credential_file_manager.py +0 -0
  88. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/auth/credential_provider.py +0 -0
  89. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/auth/servicefoundry_session.py +0 -0
  90. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/clients/__init__.py +0 -0
  91. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/clients/servicefoundry_client.py +0 -0
  92. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/clients/shell_client.py +0 -0
  93. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/clients/utils.py +0 -0
  94. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/const.py +0 -0
  95. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/dao/__init__.py +0 -0
  96. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/dao/application.py +0 -0
  97. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/dao/apply.py +0 -0
  98. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/dao/version.py +0 -0
  99. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/dao/workspace.py +0 -0
  100. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/logs_utils.py +0 -0
  101. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/messages.py +0 -0
  102. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/model/__init__.py +0 -0
  103. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/model/entity.py +0 -0
  104. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/session.py +0 -0
  105. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/util.py +0 -0
  106. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/lib/win32.py +0 -0
  107. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/__init__.py +0 -0
  108. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/lib/__init__.py +0 -0
  109. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/lib/deploy_workflow.py +0 -0
  110. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/lib/deployable_patched_models.py +0 -0
  111. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/lib/models.py +0 -0
  112. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/lib/patched_models.py +0 -0
  113. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/deploy/v2/lib/source.py +0 -0
  114. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/langchain/__init__.py +0 -0
  115. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/langchain/deprecated.py +0 -0
  116. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/langchain/truefoundry_chat.py +0 -0
  117. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/langchain/truefoundry_embeddings.py +0 -0
  118. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/langchain/truefoundry_llm.py +0 -0
  119. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/langchain/utils.py +0 -0
  120. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/logger.py +0 -0
  121. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/ml/__init__.py +0 -0
  122. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/pydantic_v1.py +0 -0
  123. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/python_deploy_codegen.py +0 -0
  124. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/version.py +0 -0
  125. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/__init__.py +0 -0
  126. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/container_task.py +0 -0
  127. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/example/deploy.sh +0 -0
  128. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/example/hello_world_package/workflow.py +0 -0
  129. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/example/package/test_workflow.py +0 -0
  130. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/example/truefoundry.yaml +0 -0
  131. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/example/workflow.yaml +0 -0
  132. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/map_task.py +0 -0
  133. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/python_task.py +0 -0
  134. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/task.py +0 -0
  135. {truefoundry-0.3.0rc14 → truefoundry-0.3.1}/truefoundry/workflow/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.3.0rc14
3
+ Version: 0.3.1
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhishek@truefoundry.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "truefoundry"
3
- version = "0.3.0rc14"
3
+ version = "0.3.1"
4
4
  description = "Truefoundry CLI"
5
5
  authors = ["Abhishek Choudhary <abhishek@truefoundry.com>"]
6
6
  readme = "README.md"
@@ -1,12 +1,14 @@
1
1
  import functools
2
2
  import sys
3
3
  import zipfile
4
+ from typing import Dict
4
5
 
5
6
  import rich_click as click
6
7
  from packaging.version import parse as parse_version
7
8
  from requests.exceptions import ConnectionError
8
9
  from rich.padding import Padding
9
10
  from rich.panel import Panel
11
+ from rich.table import Table
10
12
 
11
13
  from truefoundry.deploy.cli.console import console
12
14
  from truefoundry.deploy.lib.exceptions import (
@@ -27,16 +29,29 @@ def handle_exception(exception):
27
29
  if is_debug_env_set():
28
30
  console.print_exception(show_locals=True)
29
31
  if isinstance(exception, BadRequestException):
30
- print_error(
31
- f"[cyan bold]status_code[/] {exception.status_code}\n"
32
- f"[cyan bold]message[/] {exception.message}"
32
+ print_dict_as_table_panel(
33
+ {"Status Code": str(exception.status_code), "Error": exception.message},
34
+ title="Command Failed",
35
+ border_style="red",
33
36
  )
34
37
  elif isinstance(exception, ConnectionError):
35
- print_error("Couldn't connect to TrueFoundry.")
38
+ print_dict_as_table_panel(
39
+ {"Error": "Couldn't connect to TrueFoundry"},
40
+ title="Command Failed",
41
+ border_style="red",
42
+ )
36
43
  elif isinstance(exception, ConfigurationException):
37
- print_error(f"[cyan bold]message[/] {exception.message}")
44
+ print_dict_as_table_panel(
45
+ {"Error": exception.message},
46
+ title="Command Failed",
47
+ border_style="red",
48
+ )
38
49
  else:
39
- console.print(f"[red][bold]Error:[/] {str(exception)}[/]")
50
+ print_dict_as_table_panel(
51
+ {"Error": str(exception)},
52
+ title="Command Failed",
53
+ border_style="red",
54
+ )
40
55
 
41
56
 
42
57
  def handle_exception_wrapper(fn):
@@ -77,6 +92,28 @@ def print_message(message):
77
92
  )
78
93
 
79
94
 
95
+ def print_dict_as_table_panel(
96
+ dct: Dict[str, str],
97
+ title: str,
98
+ border_style: str = "cyan",
99
+ key_color: str = "cyan",
100
+ ):
101
+ table = Table(show_header=False, box=None)
102
+ table.add_column("Key", style=f"bold {key_color}", width=15)
103
+ table.add_column("Value")
104
+ for key, value in dct.items():
105
+ table.add_row(key, value)
106
+ console.print(
107
+ Panel(
108
+ table,
109
+ border_style=border_style,
110
+ title=title,
111
+ title_align="left",
112
+ width=click.rich_click.MAX_WIDTH,
113
+ )
114
+ )
115
+
116
+
80
117
  def unzip_package(path_to_package, destination):
81
118
  with zipfile.ZipFile(path_to_package, "r") as zip_ref:
82
119
  zip_ref.extractall(destination)
@@ -1,6 +1,9 @@
1
+ from typing import Optional
2
+
3
+
1
4
  class BadRequestException(Exception):
2
- def __init__(self, status_code, message=None):
3
- super(BadRequestException, self).__init__()
5
+ def __init__(self, status_code: int, message: Optional[str] = None):
6
+ super().__init__()
4
7
  self.status_code = status_code
5
8
  self.message = message
6
9
 
@@ -12,8 +15,8 @@ class BadRequestException(Exception):
12
15
 
13
16
 
14
17
  class ConfigurationException(Exception):
15
- def __init__(self, message=None):
16
- super(ConfigurationException, self).__init__()
18
+ def __init__(self, message: Optional[str] = None):
19
+ super().__init__()
17
20
  self.message = message
18
21
 
19
22
  def __str__(self):
@@ -247,9 +247,16 @@ def deploy_component(
247
247
  )
248
248
  component.workspace_fqn = workspace_fqn
249
249
  workspace_id = get_workspace_by_fqn(workspace_fqn).id
250
- updated_component = _handle_if_local_source(
251
- component=component, workspace_fqn=workspace_fqn
252
- )
250
+ if isinstance(component, auto_gen_models.ApplicationSet):
251
+ updated_component = component.copy(deep=True)
252
+ for i in range(len(updated_component.components)):
253
+ updated_component.components[i] = _handle_if_local_source(
254
+ component=component.components[i], workspace_fqn=workspace_fqn
255
+ )
256
+ else:
257
+ updated_component = _handle_if_local_source(
258
+ component=component, workspace_fqn=workspace_fqn
259
+ )
253
260
  client = ServiceFoundryServiceClient()
254
261
  response = client.deploy_application(
255
262
  workspace_id=workspace_id, application=updated_component
File without changes