truefoundry 0.3.2__tar.gz → 0.3.3rc1__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.2 → truefoundry-0.3.3rc1}/PKG-INFO +1 -1
  2. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/pyproject.toml +1 -1
  3. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/auto_gen/models.py +29 -1
  4. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/util.py +3 -1
  5. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/lib/deployable_patched_models.py +4 -0
  6. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/python_deploy_codegen.py +1 -0
  7. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/README.md +0 -0
  8. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/__init__.py +0 -0
  9. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/__init__.py +0 -0
  10. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/agents/__init__.py +0 -0
  11. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/agents/base.py +0 -0
  12. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/agents/developer.py +0 -0
  13. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/agents/project_identifier.py +0 -0
  14. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/agents/tester.py +0 -0
  15. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/cli.py +0 -0
  16. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/constants.py +0 -0
  17. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/exception.py +0 -0
  18. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/logger.py +0 -0
  19. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/__init__.py +0 -0
  20. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/ask.py +0 -0
  21. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/base.py +0 -0
  22. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/commit.py +0 -0
  23. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/docker_build.py +0 -0
  24. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/docker_run.py +0 -0
  25. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
  26. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/list_files.py +0 -0
  27. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/read_file.py +0 -0
  28. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/send_request.py +0 -0
  29. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/tools/write_file.py +0 -0
  30. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/utils/client.py +0 -0
  31. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/utils/diff.py +0 -0
  32. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
  33. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/cli/__init__.py +0 -0
  34. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/cli/__main__.py +0 -0
  35. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/__init__.py +0 -0
  36. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/__init__.py +0 -0
  37. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/builders/__init__.py +0 -0
  38. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/builders/dockerfile.py +0 -0
  39. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +0 -0
  40. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +0 -0
  41. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +0 -0
  42. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +0 -0
  43. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/builder/docker_service.py +0 -0
  44. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/__init__.py +0 -0
  45. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/cli.py +0 -0
  46. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/__init__.py +0 -0
  47. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/apply_command.py +0 -0
  48. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/build_command.py +0 -0
  49. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/build_logs_command.py +0 -0
  50. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/create_command.py +0 -0
  51. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/delete_command.py +0 -0
  52. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/deploy_command.py +0 -0
  53. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/get_command.py +0 -0
  54. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/list_command.py +0 -0
  55. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/login_command.py +0 -0
  56. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/logout_command.py +0 -0
  57. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/logs_command.py +0 -0
  58. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/patch_application_command.py +0 -0
  59. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/patch_command.py +0 -0
  60. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/redeploy_command.py +0 -0
  61. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/terminate_comand.py +0 -0
  62. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/commands/trigger_command.py +0 -0
  63. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/config.py +0 -0
  64. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/console.py +0 -0
  65. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/const.py +0 -0
  66. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/cli/display_util.py +0 -0
  67. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/core/__init__.py +0 -0
  68. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/core/login.py +0 -0
  69. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/core/logout.py +0 -0
  70. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/__init__.py +0 -0
  71. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/__main__.py +0 -0
  72. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/app.py +0 -0
  73. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/build.py +0 -0
  74. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/remote/__init__.py +0 -0
  75. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/remote/context.py +0 -0
  76. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/remote/method.py +0 -0
  77. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/remote/remote.py +0 -0
  78. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/route.py +0 -0
  79. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/service.py +0 -0
  80. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/function_service/utils.py +0 -0
  81. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/io/__init__.py +0 -0
  82. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/io/output_callback.py +0 -0
  83. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/io/rich_output_callback.py +0 -0
  84. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/json_util.py +0 -0
  85. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/__init__.py +0 -0
  86. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/auth/auth_service_client.py +0 -0
  87. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/auth/credential_file_manager.py +0 -0
  88. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/auth/credential_provider.py +0 -0
  89. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/auth/servicefoundry_session.py +0 -0
  90. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/clients/__init__.py +0 -0
  91. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/clients/servicefoundry_client.py +0 -0
  92. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/clients/shell_client.py +0 -0
  93. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/clients/utils.py +0 -0
  94. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/const.py +0 -0
  95. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/dao/__init__.py +0 -0
  96. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/dao/application.py +0 -0
  97. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/dao/apply.py +0 -0
  98. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/dao/version.py +0 -0
  99. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/dao/workspace.py +0 -0
  100. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/exceptions.py +0 -0
  101. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/logs_utils.py +0 -0
  102. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/messages.py +0 -0
  103. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/model/__init__.py +0 -0
  104. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/model/entity.py +0 -0
  105. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/session.py +0 -0
  106. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/util.py +0 -0
  107. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/lib/win32.py +0 -0
  108. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/__init__.py +0 -0
  109. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/lib/__init__.py +0 -0
  110. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/lib/deploy.py +0 -0
  111. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/lib/deploy_workflow.py +0 -0
  112. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/lib/models.py +0 -0
  113. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/lib/patched_models.py +0 -0
  114. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/deploy/v2/lib/source.py +0 -0
  115. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/langchain/__init__.py +0 -0
  116. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/langchain/deprecated.py +0 -0
  117. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/langchain/truefoundry_chat.py +0 -0
  118. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/langchain/truefoundry_embeddings.py +0 -0
  119. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/langchain/truefoundry_llm.py +0 -0
  120. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/langchain/utils.py +0 -0
  121. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/logger.py +0 -0
  122. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/ml/__init__.py +0 -0
  123. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/pydantic_v1.py +0 -0
  124. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/version.py +0 -0
  125. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/__init__.py +0 -0
  126. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/container_task.py +0 -0
  127. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/example/deploy.sh +0 -0
  128. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/example/hello_world_package/workflow.py +0 -0
  129. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/example/package/test_workflow.py +0 -0
  130. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/example/truefoundry.yaml +0 -0
  131. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/example/workflow.yaml +0 -0
  132. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/map_task.py +0 -0
  133. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/python_task.py +0 -0
  134. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/task.py +0 -0
  135. {truefoundry-0.3.2 → truefoundry-0.3.3rc1}/truefoundry/workflow/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.3.2
3
+ Version: 0.3.3rc1
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.2"
3
+ version = "0.3.3rc1"
4
4
  description = "Truefoundry CLI"
5
5
  authors = ["Abhishek Choudhary <abhishek@truefoundry.com>"]
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: application.json
3
- # timestamp: 2024-09-10T13:19:47+00:00
3
+ # timestamp: 2024-09-19T11:05:06+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -444,6 +444,30 @@ class Image(BaseModel):
444
444
  )
445
445
 
446
446
 
447
+ class JobAlert(BaseModel):
448
+ """
449
+ +docs=Describes the configuration for the job alerts
450
+ +label=Alert
451
+ """
452
+
453
+ notification_channel: str = Field(
454
+ ...,
455
+ description='+label=Notification Channel\n+usage=Specify the notification channel to send alerts to\n+uiType=IntegrationSelect\n+uiProps={"integrationType":"notification-channel"}\n+sort=660',
456
+ )
457
+ on_start: bool = Field(
458
+ False,
459
+ description="+label=On Start\n+usage=Send an alert when the job starts\n+sort=670",
460
+ )
461
+ on_completion: bool = Field(
462
+ False,
463
+ description="+label=On Completion\n+usage=Send an alert when the job completes\n+sort=680",
464
+ )
465
+ on_failure: bool = Field(
466
+ True,
467
+ description="+label=On Failure\n+usage=Send an alert when the job fails\n+sort=690",
468
+ )
469
+
470
+
447
471
  class KafkaMetricConfig(BaseModel):
448
472
  type: Literal["kafka"] = Field(..., description="+value=kafka")
449
473
  lag_threshold: conint(ge=1) = Field(
@@ -1350,6 +1374,10 @@ class Job(BaseModel):
1350
1374
  description="+label=Environment Variables\n+usage=Configure environment variables to be injected in the service either as plain text or secrets. [Docs](https://docs.truefoundry.com/docs/env-variables)\n+icon=fa-globe\n+sort=500",
1351
1375
  )
1352
1376
  resources: Optional[Resources] = None
1377
+ alerts: Optional[List[JobAlert]] = Field(
1378
+ None,
1379
+ description="+label=Alerts\n+usage=Configure alerts to be sent when the job starts/fails/completes\n+icon=fa-bell\n+sort=650",
1380
+ )
1353
1381
  retries: conint(ge=0, le=10) = Field(
1354
1382
  0,
1355
1383
  description="+label=Retries\n+usage=Specify the maximum number of attempts to retry a job before it is marked as failed.\n+icon=fa-repeat\n+sort=700",
@@ -36,7 +36,9 @@ def handle_exception(exception):
36
36
  )
37
37
  elif isinstance(exception, ConnectionError):
38
38
  print_dict_as_table_panel(
39
- {"Error": "Couldn't connect to TrueFoundry"},
39
+ {
40
+ "Error": "Couldn't connect to TrueFoundry. Please make sure that the provided `--host` is correct."
41
+ },
40
42
  title="Command Failed",
41
43
  border_style="red",
42
44
  )
@@ -3,6 +3,7 @@ from typing import Literal, Union
3
3
  from truefoundry.deploy.auto_gen import models
4
4
  from truefoundry.deploy.lib.model.entity import Deployment
5
5
  from truefoundry.deploy.v2.lib.deploy import deploy_component
6
+ from truefoundry.deploy.v2.lib.patched_models import LocalSource
6
7
  from truefoundry.pydantic_v1 import BaseModel, Field, conint
7
8
 
8
9
 
@@ -79,6 +80,9 @@ class Application(models.Application, DeployablePatchedModelBase):
79
80
 
80
81
  class Workflow(models.Workflow, DeployablePatchedModelBase):
81
82
  type: Literal["workflow"] = "workflow"
83
+ source: Union[models.RemoteSource, models.LocalSource] = Field(
84
+ default_factory=LocalSource
85
+ )
82
86
 
83
87
  def deploy(self, workspace_fqn: str, wait: bool = True) -> Deployment:
84
88
  from truefoundry.deploy.v2.lib.deploy_workflow import deploy_workflow
@@ -16,6 +16,7 @@ def generate_code(
16
16
  workspace_fqn: str,
17
17
  ):
18
18
  symbols = ",".join(symbols_to_import)
19
+ application_type = application_type.replace(" ", "").replace("-", "_")
19
20
  code = f"""\
20
21
  import logging
21
22
  from truefoundry.deploy import (
File without changes