truefoundry 0.3.0rc9__tar.gz → 0.3.0rc10__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.0rc9 → truefoundry-0.3.0rc10}/PKG-INFO +2 -2
  2. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/pyproject.toml +2 -2
  3. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/__init__.py +1 -0
  4. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/cli.py +2 -0
  5. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/trigger_command.py +58 -0
  6. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/clients/servicefoundry_client.py +6 -0
  7. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/dao/application.py +20 -0
  8. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/README.md +0 -0
  9. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/__init__.py +0 -0
  10. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/__init__.py +0 -0
  11. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/agents/__init__.py +0 -0
  12. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/agents/base.py +0 -0
  13. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/agents/developer.py +0 -0
  14. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/agents/project_identifier.py +0 -0
  15. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/agents/tester.py +0 -0
  16. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/cli.py +0 -0
  17. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/constants.py +0 -0
  18. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/exception.py +0 -0
  19. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/logger.py +0 -0
  20. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/__init__.py +0 -0
  21. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/ask.py +0 -0
  22. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/base.py +0 -0
  23. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/commit.py +0 -0
  24. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/docker_build.py +0 -0
  25. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/docker_run.py +0 -0
  26. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/file_type_counts.py +0 -0
  27. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/list_files.py +0 -0
  28. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/read_file.py +0 -0
  29. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/send_request.py +0 -0
  30. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/tools/write_file.py +0 -0
  31. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/utils/client.py +0 -0
  32. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/utils/diff.py +0 -0
  33. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/autodeploy/utils/pydantic_compat.py +0 -0
  34. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/cli/__init__.py +0 -0
  35. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/cli/__main__.py +0 -0
  36. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/auto_gen/models.py +0 -0
  37. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/__init__.py +0 -0
  38. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/builders/__init__.py +0 -0
  39. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/builders/dockerfile.py +0 -0
  40. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/__init__.py +0 -0
  41. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/builders/tfy_notebook_buildpack/dockerfile_template.py +0 -0
  42. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/builders/tfy_python_buildpack/__init__.py +0 -0
  43. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/builders/tfy_python_buildpack/dockerfile_template.py +0 -0
  44. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/builder/docker_service.py +0 -0
  45. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/__init__.py +0 -0
  46. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/__init__.py +0 -0
  47. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/apply_command.py +0 -0
  48. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/build_command.py +0 -0
  49. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/build_logs_command.py +0 -0
  50. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/create_command.py +0 -0
  51. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/delete_command.py +0 -0
  52. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/deploy_command.py +0 -0
  53. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/get_command.py +0 -0
  54. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/list_command.py +0 -0
  55. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/login_command.py +0 -0
  56. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/logout_command.py +0 -0
  57. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/logs_command.py +0 -0
  58. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/patch_application_command.py +0 -0
  59. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/patch_command.py +0 -0
  60. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/redeploy_command.py +0 -0
  61. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/commands/terminate_comand.py +0 -0
  62. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/config.py +0 -0
  63. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/console.py +0 -0
  64. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/const.py +0 -0
  65. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/display_util.py +0 -0
  66. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/cli/util.py +0 -0
  67. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/core/__init__.py +0 -0
  68. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/core/login.py +0 -0
  69. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/core/logout.py +0 -0
  70. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/__init__.py +0 -0
  71. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/__main__.py +0 -0
  72. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/app.py +0 -0
  73. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/build.py +0 -0
  74. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/remote/__init__.py +0 -0
  75. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/remote/context.py +0 -0
  76. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/remote/method.py +0 -0
  77. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/remote/remote.py +0 -0
  78. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/route.py +0 -0
  79. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/service.py +0 -0
  80. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/function_service/utils.py +0 -0
  81. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/io/__init__.py +0 -0
  82. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/io/output_callback.py +0 -0
  83. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/io/rich_output_callback.py +0 -0
  84. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/json_util.py +0 -0
  85. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/__init__.py +0 -0
  86. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/auth/auth_service_client.py +0 -0
  87. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/auth/credential_file_manager.py +0 -0
  88. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/auth/credential_provider.py +0 -0
  89. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/auth/servicefoundry_session.py +0 -0
  90. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/clients/__init__.py +0 -0
  91. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/clients/shell_client.py +0 -0
  92. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/clients/utils.py +0 -0
  93. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/const.py +0 -0
  94. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/dao/__init__.py +0 -0
  95. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/dao/apply.py +0 -0
  96. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/dao/version.py +0 -0
  97. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/dao/workspace.py +0 -0
  98. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/exceptions.py +0 -0
  99. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/logs_utils.py +0 -0
  100. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/messages.py +0 -0
  101. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/model/__init__.py +0 -0
  102. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/model/entity.py +0 -0
  103. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/session.py +0 -0
  104. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/util.py +0 -0
  105. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/lib/win32.py +0 -0
  106. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/__init__.py +0 -0
  107. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/lib/__init__.py +0 -0
  108. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/lib/deploy.py +0 -0
  109. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/lib/deploy_workflow.py +0 -0
  110. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/lib/deployable_patched_models.py +0 -0
  111. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/lib/models.py +0 -0
  112. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/lib/patched_models.py +0 -0
  113. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/deploy/v2/lib/source.py +0 -0
  114. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/langchain/__init__.py +0 -0
  115. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/langchain/deprecated.py +0 -0
  116. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/langchain/truefoundry_chat.py +0 -0
  117. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/langchain/truefoundry_embeddings.py +0 -0
  118. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/langchain/truefoundry_llm.py +0 -0
  119. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/langchain/utils.py +0 -0
  120. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/logger.py +0 -0
  121. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/ml/__init__.py +0 -0
  122. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/pydantic_v1.py +0 -0
  123. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/python_deploy_codegen.py +0 -0
  124. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/version.py +0 -0
  125. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/__init__.py +0 -0
  126. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/container_task.py +0 -0
  127. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/example/deploy.sh +0 -0
  128. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/example/hello_world_package/workflow.py +0 -0
  129. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/example/package/test_workflow.py +0 -0
  130. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/example/truefoundry.yaml +0 -0
  131. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/example/workflow.yaml +0 -0
  132. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/map_task.py +0 -0
  133. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/python_task.py +0 -0
  134. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/task.py +0 -0
  135. {truefoundry-0.3.0rc9 → truefoundry-0.3.0rc10}/truefoundry/workflow/workflow.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: truefoundry
3
- Version: 0.3.0rc9
3
+ Version: 0.3.0rc10
4
4
  Summary: Truefoundry CLI
5
5
  Author: Abhishek Choudhary
6
6
  Author-email: abhishek@truefoundry.com
@@ -24,7 +24,7 @@ Requires-Dist: flytekit (==1.12.2) ; extra == "workflow"
24
24
  Requires-Dist: gitignorefile (>=1.1.2,<1.2.0)
25
25
  Requires-Dist: importlib-metadata (>=6.0.1,<8.0.0)
26
26
  Requires-Dist: importlib-resources (>=5.2.0,<6.0.0)
27
- Requires-Dist: mlfoundry (==0.11.2) ; extra == "ml"
27
+ Requires-Dist: mlfoundry (==0.11.3) ; extra == "ml"
28
28
  Requires-Dist: openai (>=1.16.2,<2.0.0)
29
29
  Requires-Dist: packaging (>=20.0,<25.0)
30
30
  Requires-Dist: pydantic (>=1.10.0,<3)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "truefoundry"
3
- version = "0.3.0rc9"
3
+ version = "0.3.0rc10"
4
4
  description = "Truefoundry CLI"
5
5
  authors = ["Abhishek Choudhary <abhishek@truefoundry.com>"]
6
6
  readme = "README.md"
@@ -17,7 +17,7 @@ GitPython = ">=3.1.43,<3.2.0"
17
17
  importlib-metadata = ">=6.0.1,<8.0.0"
18
18
  importlib-resources = "^5.2.0"
19
19
  Mako = "^1.1.6"
20
- mlfoundry = { version = "0.11.2", optional = true }
20
+ mlfoundry = { version = "0.11.3", optional = true }
21
21
  openai = ">=1.16.2,<2.0.0"
22
22
  packaging = ">=20.0,<25.0"
23
23
  pydantic = ">=1.10.0,<3"
@@ -16,6 +16,7 @@ from truefoundry.deploy.lib.dao.application import (
16
16
  list_job_runs,
17
17
  terminate_job_run,
18
18
  trigger_job,
19
+ trigger_workflow,
19
20
  )
20
21
  from truefoundry.deploy.lib.dao.version import (
21
22
  get_version as get_application_version,
@@ -13,6 +13,7 @@ from truefoundry.deploy.cli.commands import (
13
13
  get_logout_command,
14
14
  get_patch_application_command,
15
15
  get_patch_command,
16
+ get_trigger_command,
16
17
  )
17
18
  from truefoundry.deploy.cli.config import CliConfig
18
19
  from truefoundry.deploy.cli.const import GROUP_CLS
@@ -36,6 +37,7 @@ def create_truefoundry_cli():
36
37
  cli.add_command(get_deploy_command())
37
38
  cli.add_command(get_patch_application_command())
38
39
  cli.add_command(get_delete_command())
40
+ cli.add_command(get_trigger_command())
39
41
 
40
42
  if not (sys.platform.startswith("win32") or sys.platform.startswith("cygwin")):
41
43
  cli.add_command(get_patch_command())
@@ -82,6 +82,64 @@ def trigger_job(application_fqn: str, command: Optional[Sequence[str]], params):
82
82
  )
83
83
 
84
84
 
85
+ @click.command(
86
+ name="workflow",
87
+ cls=COMMAND_CLS,
88
+ context_settings={"ignore_unknown_options": True, "allow_extra_args": True},
89
+ )
90
+ @click.option(
91
+ "--application-fqn",
92
+ "--application_fqn",
93
+ type=click.STRING,
94
+ required=True,
95
+ help="FQN of the workflow application",
96
+ )
97
+ @click.argument(
98
+ "inputs",
99
+ type=click.STRING,
100
+ nargs=-1,
101
+ required=False,
102
+ )
103
+ @handle_exception_wrapper
104
+ def trigger_workflow(application_fqn: str, inputs):
105
+ """
106
+ Trigger a Workflow on TrueFoundry
107
+
108
+ [b]tfy trigger workflow --application-fqn "my-cluster:my-workspace:my-workflow"[/]
109
+
110
+ \n
111
+ Additionally, you can pass inputs (if defined in the workflow)\n\n
112
+
113
+ Passing inputs:
114
+
115
+ [b]tfy trigger workflow --application-fqn "my-cluster:my-workspace:my-workflow" -- --input1_name input1_value --input2_name input2_value ...[/]
116
+ """
117
+ if inputs:
118
+ inputs_dict = {}
119
+ if len(inputs) % 2 != 0:
120
+ raise ClickException(
121
+ f"Found odd number of argument pairs: {inputs}. "
122
+ "Perhaps you forgot to pass a value for one of the inputs? "
123
+ "inputs for workflow should be passed in the "
124
+ "format `--input1_name input1_value --input2_name input2_value ...`"
125
+ )
126
+ for i in range(0, len(inputs), 2):
127
+ key = inputs[i]
128
+ value = inputs[i + 1]
129
+ if not key.startswith("--"):
130
+ raise ClickException(
131
+ f"Got ambiguous argument {key!r} in inputs: {inputs}. "
132
+ f"input names should be prefixed with '--' i.e. "
133
+ "inputs for workflow should be passed in the "
134
+ "format `--input1_name input1_value --input2_name input2_value ...`"
135
+ )
136
+ key = key.lstrip("-")
137
+ inputs_dict[key] = value
138
+
139
+ application.trigger_workflow(application_fqn=application_fqn, inputs=inputs)
140
+
141
+
85
142
  def get_trigger_command():
86
143
  trigger_command.add_command(trigger_job)
144
+ trigger_command.add_command(trigger_workflow)
87
145
  return trigger_command
@@ -616,6 +616,12 @@ class ServiceFoundryServiceClient:
616
616
  response = request_handling(res)
617
617
  return TriggerJobResult.parse_obj(response)
618
618
 
619
+ def trigger_workflow(self, application_id: str, inputs: Dict[str, Any]):
620
+ url = f"{self._api_server_url}/{VERSION_PREFIX}/workflow/{application_id}/executions"
621
+ res = requests.post(url, json=inputs, headers=self._get_header())
622
+ response = request_handling(res)
623
+ return response
624
+
619
625
  @check_min_cli_version
620
626
  def get_docker_registry_creds(
621
627
  self, docker_registry_fqn: str, cluster_id: str
@@ -241,3 +241,23 @@ def terminate_job_run(
241
241
  job_run_name=job_run_name,
242
242
  )
243
243
  return response
244
+
245
+
246
+ def trigger_workflow(application_fqn: str, inputs: Optional[Dict[str, Any]] = None):
247
+ inputs = inputs or {}
248
+ client = ServiceFoundryServiceClient()
249
+ _application_info = client.get_application_info_by_fqn(
250
+ application_fqn=application_fqn
251
+ )
252
+ application_info = client.get_application_info(
253
+ application_id=_application_info.applicationId
254
+ )
255
+ client.trigger_workflow(
256
+ application_id=application_info.id,
257
+ inputs=inputs,
258
+ )
259
+ logger.info(f"Started Execution for Workflow: {application_info.name}")
260
+ executions_page = (
261
+ f"{client.base_url.strip('/')}/deployments/{application_info.id}?tab=executions"
262
+ )
263
+ logger.info(f"You can check the executions at {executions_page}")