uipath 2.0.75__tar.gz → 2.0.76__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 uipath might be problematic. Click here for more details.

Files changed (200) hide show
  1. {uipath-2.0.75 → uipath-2.0.76}/PKG-INFO +1 -1
  2. uipath-2.0.76/docs/index.md +34 -0
  3. {uipath-2.0.75 → uipath-2.0.76}/pyproject.toml +1 -1
  4. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_pack.py +166 -53
  5. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_pack.py +147 -0
  6. uipath-2.0.76/uv.lock +3527 -0
  7. uipath-2.0.75/docs/index.md +0 -22
  8. uipath-2.0.75/uv.lock +0 -3765
  9. {uipath-2.0.75 → uipath-2.0.76}/.cursorrules +0 -0
  10. {uipath-2.0.75 → uipath-2.0.76}/.editorconfig +0 -0
  11. {uipath-2.0.75 → uipath-2.0.76}/.gitattributes +0 -0
  12. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/cd.yml +0 -0
  13. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/ci.yml +0 -0
  14. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/commitlint.yml +0 -0
  15. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/lint.yml +0 -0
  16. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/publish-dev.yml +0 -0
  17. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/publish-docs.yml +0 -0
  18. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/slack.yml +0 -0
  19. {uipath-2.0.75 → uipath-2.0.76}/.github/workflows/test.yml +0 -0
  20. {uipath-2.0.75 → uipath-2.0.76}/.gitignore +0 -0
  21. {uipath-2.0.75 → uipath-2.0.76}/.pre-commit-config.yaml +0 -0
  22. {uipath-2.0.75 → uipath-2.0.76}/.python-version +0 -0
  23. {uipath-2.0.75 → uipath-2.0.76}/.vscode/extensions.json +0 -0
  24. {uipath-2.0.75 → uipath-2.0.76}/.vscode/launch.json +0 -0
  25. {uipath-2.0.75 → uipath-2.0.76}/.vscode/settings.json +0 -0
  26. {uipath-2.0.75 → uipath-2.0.76}/CONTRIBUTING.md +0 -0
  27. {uipath-2.0.75 → uipath-2.0.76}/LICENSE +0 -0
  28. {uipath-2.0.75 → uipath-2.0.76}/README.md +0 -0
  29. {uipath-2.0.75 → uipath-2.0.76}/docs/CONTRIBUTING.md +0 -0
  30. {uipath-2.0.75 → uipath-2.0.76}/docs/FAQ.md +0 -0
  31. {uipath-2.0.75 → uipath-2.0.76}/docs/assets/env-preparation-failed-dark.png +0 -0
  32. {uipath-2.0.75 → uipath-2.0.76}/docs/assets/env-preparation-failed-light.png +0 -0
  33. {uipath-2.0.75 → uipath-2.0.76}/docs/assets/favicon.png +0 -0
  34. {uipath-2.0.75 → uipath-2.0.76}/docs/assets/logo-dark.svg +0 -0
  35. {uipath-2.0.75 → uipath-2.0.76}/docs/assets/logo-light.svg +0 -0
  36. {uipath-2.0.75 → uipath-2.0.76}/docs/cli/index.md +0 -0
  37. {uipath-2.0.75 → uipath-2.0.76}/docs/core/actions.md +0 -0
  38. {uipath-2.0.75 → uipath-2.0.76}/docs/core/assets/cloud_env_var_dark.gif +0 -0
  39. {uipath-2.0.75 → uipath-2.0.76}/docs/core/assets/cloud_env_var_light.gif +0 -0
  40. {uipath-2.0.75 → uipath-2.0.76}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
  41. {uipath-2.0.75 → uipath-2.0.76}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
  42. {uipath-2.0.75 → uipath-2.0.76}/docs/core/assets/copy_path_dark.png +0 -0
  43. {uipath-2.0.75 → uipath-2.0.76}/docs/core/assets/copy_path_light.png +0 -0
  44. {uipath-2.0.75 → uipath-2.0.76}/docs/core/assets.md +0 -0
  45. {uipath-2.0.75 → uipath-2.0.76}/docs/core/attachments.md +0 -0
  46. {uipath-2.0.75 → uipath-2.0.76}/docs/core/buckets.md +0 -0
  47. {uipath-2.0.75 → uipath-2.0.76}/docs/core/connections.md +0 -0
  48. {uipath-2.0.75 → uipath-2.0.76}/docs/core/context_grounding.md +0 -0
  49. {uipath-2.0.75 → uipath-2.0.76}/docs/core/environment_variables.md +0 -0
  50. {uipath-2.0.75 → uipath-2.0.76}/docs/core/getting_started.md +0 -0
  51. {uipath-2.0.75 → uipath-2.0.76}/docs/core/jobs.md +0 -0
  52. {uipath-2.0.75 → uipath-2.0.76}/docs/core/processes.md +0 -0
  53. {uipath-2.0.75 → uipath-2.0.76}/docs/core/queues.md +0 -0
  54. {uipath-2.0.75 → uipath-2.0.76}/docs/core/traced.md +0 -0
  55. {uipath-2.0.75 → uipath-2.0.76}/docs/hooks.py +0 -0
  56. {uipath-2.0.75 → uipath-2.0.76}/docs/javascripts/extra.js +0 -0
  57. {uipath-2.0.75 → uipath-2.0.76}/docs/overrides/main.html +0 -0
  58. {uipath-2.0.75 → uipath-2.0.76}/docs/overrides/partials/actions.html +0 -0
  59. {uipath-2.0.75 → uipath-2.0.76}/docs/overrides/partials/logo.html +0 -0
  60. {uipath-2.0.75 → uipath-2.0.76}/docs/release_policy.md +0 -0
  61. {uipath-2.0.75 → uipath-2.0.76}/docs/stylesheets/extra.css +0 -0
  62. {uipath-2.0.75 → uipath-2.0.76}/justfile +0 -0
  63. {uipath-2.0.75 → uipath-2.0.76}/mkdocs.yml +0 -0
  64. {uipath-2.0.75 → uipath-2.0.76}/py.typed +0 -0
  65. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/__init__.py +0 -0
  66. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/README.md +0 -0
  67. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/__init__.py +0 -0
  68. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/_auth_server.py +0 -0
  69. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/_client_credentials.py +0 -0
  70. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/_models.py +0 -0
  71. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
  72. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/_portal_service.py +0 -0
  73. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/_utils.py +0 -0
  74. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/auth_config.json +0 -0
  75. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/index.html +0 -0
  76. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/localhost.crt +0 -0
  77. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_auth/localhost.key +0 -0
  78. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_runtime/_contracts.py +0 -0
  79. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_runtime/_escalation.py +0 -0
  80. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_runtime/_hitl.py +0 -0
  81. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_runtime/_logging.py +0 -0
  82. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_runtime/_runtime.py +0 -0
  83. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
  84. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_templates/.rels.template +0 -0
  85. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
  86. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_templates/main.py.template +0 -0
  87. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
  88. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_common.py +0 -0
  89. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_console.py +0 -0
  90. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_constants.py +0 -0
  91. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_debug.py +0 -0
  92. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_folders.py +0 -0
  93. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_input_args.py +0 -0
  94. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
  95. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_processes.py +0 -0
  96. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/_utils/_tracing.py +0 -0
  97. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_auth.py +0 -0
  98. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_deploy.py +0 -0
  99. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_init.py +0 -0
  100. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_invoke.py +0 -0
  101. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_new.py +0 -0
  102. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_publish.py +0 -0
  103. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/cli_run.py +0 -0
  104. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/middlewares.py +0 -0
  105. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_cli/spinner.py +0 -0
  106. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_config.py +0 -0
  107. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_execution_context.py +0 -0
  108. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_folder_context.py +0 -0
  109. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/__init__.py +0 -0
  110. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/_base_service.py +0 -0
  111. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/actions_service.py +0 -0
  112. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/api_client.py +0 -0
  113. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/assets_service.py +0 -0
  114. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/attachments_service.py +0 -0
  115. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/buckets_service.py +0 -0
  116. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/connections_service.py +0 -0
  117. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/context_grounding_service.py +0 -0
  118. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/folder_service.py +0 -0
  119. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/jobs_service.py +0 -0
  120. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/llm_gateway_service.py +0 -0
  121. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/processes_service.py +0 -0
  122. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_services/queues_service.py +0 -0
  123. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_uipath.py +0 -0
  124. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/__init__.py +0 -0
  125. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_endpoint.py +0 -0
  126. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_infer_bindings.py +0 -0
  127. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_logs.py +0 -0
  128. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_read_overwrites.py +0 -0
  129. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_request_override.py +0 -0
  130. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_request_spec.py +0 -0
  131. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_ssl_context.py +0 -0
  132. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_url.py +0 -0
  133. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/_user_agent.py +0 -0
  134. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/_utils/constants.py +0 -0
  135. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/__init__.py +0 -0
  136. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/action_schema.py +0 -0
  137. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/actions.py +0 -0
  138. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/assets.py +0 -0
  139. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/attachment.py +0 -0
  140. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/buckets.py +0 -0
  141. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/connections.py +0 -0
  142. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/context_grounding.py +0 -0
  143. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/context_grounding_index.py +0 -0
  144. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/errors.py +0 -0
  145. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/exceptions.py +0 -0
  146. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/interrupt_models.py +0 -0
  147. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/job.py +0 -0
  148. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/llm_gateway.py +0 -0
  149. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/processes.py +0 -0
  150. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/models/queues.py +0 -0
  151. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/py.typed +0 -0
  152. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/telemetry/__init__.py +0 -0
  153. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/telemetry/_constants.py +0 -0
  154. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/telemetry/_track.py +0 -0
  155. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/tracing/__init__.py +0 -0
  156. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/tracing/_otel_exporters.py +0 -0
  157. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/tracing/_traced.py +0 -0
  158. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/tracing/_utils.py +0 -0
  159. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/utils/__init__.py +0 -0
  160. {uipath-2.0.75 → uipath-2.0.76}/src/uipath/utils/_endpoints_manager.py +0 -0
  161. {uipath-2.0.75 → uipath-2.0.76}/tests/__init__.py +0 -0
  162. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/conftest.py +0 -0
  163. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/mocks/bindings_script.py +0 -0
  164. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/mocks/pyproject.toml +0 -0
  165. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/mocks/simple_script.py +0 -0
  166. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/mocks/uipath-mock.json +0 -0
  167. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
  168. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_hitl.py +0 -0
  169. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_init.py +0 -0
  170. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_invoke.py +0 -0
  171. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_new.py +0 -0
  172. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_publish.py +0 -0
  173. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_run.py +0 -0
  174. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/test_utils.py +0 -0
  175. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/utils/project_details.py +0 -0
  176. {uipath-2.0.75 → uipath-2.0.76}/tests/cli/utils/uipath_json.py +0 -0
  177. {uipath-2.0.75 → uipath-2.0.76}/tests/conftest.py +0 -0
  178. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/conftest.py +0 -0
  179. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_actions_service.py +0 -0
  180. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_api_client.py +0 -0
  181. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_assets_service.py +0 -0
  182. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_attachments_service.py +0 -0
  183. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_base_service.py +0 -0
  184. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_buckets_service.py +0 -0
  185. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_connections_service.py +0 -0
  186. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_context_grounding_service.py +0 -0
  187. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_folder_service.py +0 -0
  188. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_jobs_service.py +0 -0
  189. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_llm_integration.py +0 -0
  190. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_llm_service.py +0 -0
  191. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_processes_service.py +0 -0
  192. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_queues_service.py +0 -0
  193. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
  194. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/test_bindings_inference.py +0 -0
  195. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/test_config.py +0 -0
  196. {uipath-2.0.75 → uipath-2.0.76}/tests/sdk/test_overwrites.py +0 -0
  197. {uipath-2.0.75 → uipath-2.0.76}/tests/tracing/test_otel_exporters.py +0 -0
  198. {uipath-2.0.75 → uipath-2.0.76}/tests/tracing/test_span_utils.py +0 -0
  199. {uipath-2.0.75 → uipath-2.0.76}/tests/tracing/test_traced.py +0 -0
  200. {uipath-2.0.75 → uipath-2.0.76}/tests/tracing/test_tracing_manager.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.75
3
+ Version: 2.0.76
4
4
  Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
5
5
  Project-URL: Homepage, https://uipath.com
6
6
  Project-URL: Repository, https://github.com/UiPath/uipath-python
@@ -0,0 +1,34 @@
1
+ ---
2
+ title: Getting Started
3
+ ---
4
+
5
+ <div class="grid cards" markdown>
6
+ - __UiPath SDK__
7
+
8
+ ---
9
+
10
+ Code with full UiPath context to build custom automations and agents from the ground up.
11
+
12
+ [Start Building](./core/getting_started.md)
13
+
14
+ </div>
15
+
16
+ <h2> Extensions </h2>
17
+ <div class="grid cards" markdown>
18
+ - __UiPath Langchain SDK__
19
+
20
+ ---
21
+
22
+ Build enterprise-grade UiPath agents using the LangChain framework, with seamless integration from build to run.
23
+
24
+ [Get Started](./langchain/quick_start.md)
25
+
26
+ - __UiPath LLamaIndex SDK__
27
+
28
+ ---
29
+
30
+ Build enterprise-grade UiPath agents using the LLamaIndex framework, with seamless integration from build to run.
31
+
32
+ [Get Started](./llamaindex/quick_start.md)
33
+
34
+ </div>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "uipath"
3
- version = "2.0.75"
3
+ version = "2.0.76"
4
4
  description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
5
5
  readme = { file = "README.md", content-type = "text/markdown" }
6
6
  requires-python = ">=3.10"
@@ -1,10 +1,12 @@
1
1
  # type: ignore
2
2
  import json
3
3
  import os
4
+ import re
4
5
  import subprocess
5
6
  import uuid
6
7
  import zipfile
7
8
  from string import Template
9
+ from typing import Dict, Tuple
8
10
 
9
11
  import click
10
12
 
@@ -50,6 +52,7 @@ def check_config(directory):
50
52
  "entryPoints": config_data["entryPoints"],
51
53
  "version": toml_data["version"],
52
54
  "authors": toml_data["authors"],
55
+ "dependencies": toml_data.get("dependencies", {}),
53
56
  }
54
57
 
55
58
 
@@ -113,7 +116,7 @@ def handle_uv_operations(directory):
113
116
  run_uv_lock(directory)
114
117
 
115
118
 
116
- def generate_operate_file(entryPoints):
119
+ def generate_operate_file(entryPoints, dependencies=None):
117
120
  project_id = str(uuid.uuid4())
118
121
 
119
122
  first_entry = entryPoints[0]
@@ -130,6 +133,10 @@ def generate_operate_file(entryPoints):
130
133
  "runtimeOptions": {"requiresUserInteraction": False, "isAttended": False},
131
134
  }
132
135
 
136
+ # Add dependencies if provided
137
+ if dependencies:
138
+ operate_json_data["dependencies"] = dependencies
139
+
133
140
  return operate_json_data
134
141
 
135
142
 
@@ -149,40 +156,6 @@ def generate_bindings_content():
149
156
  return bindings_content
150
157
 
151
158
 
152
- def get_proposed_version(directory):
153
- output_dir = os.path.join(directory, ".uipath")
154
- if not os.path.exists(output_dir):
155
- return None
156
-
157
- # Get all .nupkg files
158
- nupkg_files = [f for f in os.listdir(output_dir) if f.endswith(".nupkg")]
159
- if not nupkg_files:
160
- return None
161
-
162
- # Sort by modification time to get most recent
163
- latest_file = max(
164
- nupkg_files, key=lambda f: os.path.getmtime(os.path.join(output_dir, f))
165
- )
166
-
167
- # Extract version from filename
168
- # Remove .nupkg extension first
169
- name_version = latest_file[:-6]
170
- # Find 3rd last occurrence of . by splitting and joining parts
171
- parts = name_version.split(".")
172
- if len(parts) >= 3:
173
- version = ".".join(parts[-3:])
174
- else:
175
- version = name_version
176
-
177
- # Increment patch version by 1
178
- try:
179
- major, minor, patch = version.split(".")
180
- new_version = f"{major}.{minor}.{int(patch) + 1}"
181
- return new_version
182
- except Exception:
183
- return "0.0.1"
184
-
185
-
186
159
  def generate_content_types_content():
187
160
  templates_path = os.path.join(
188
161
  os.path.dirname(__file__), "_templates", "[Content_Types].xml.template"
@@ -278,9 +251,10 @@ def pack_fn(
278
251
  version,
279
252
  authors,
280
253
  directory,
254
+ dependencies=None,
281
255
  include_uv_lock=True,
282
256
  ):
283
- operate_file = generate_operate_file(entryPoints)
257
+ operate_file = generate_operate_file(entryPoints, dependencies)
284
258
  entrypoints_file = generate_entrypoints_file(entryPoints)
285
259
 
286
260
  # Get bindings from uipath.json if available
@@ -389,28 +363,166 @@ def pack_fn(
389
363
  z.writestr(f"content/{file}", f.read())
390
364
 
391
365
 
392
- def read_toml_project(file_path: str) -> dict[str, any]:
393
- with open(file_path, "rb") as f:
394
- content = tomllib.load(f)
395
- if "project" not in content:
396
- console.error("pyproject.toml is missing the required field: project.")
397
- if "name" not in content["project"]:
398
- console.error("pyproject.toml is missing the required field: project.name.")
399
- if "description" not in content["project"]:
366
+ def parse_dependency_string(dependency: str) -> Tuple[str, str]:
367
+ """Parse a dependency string into package name and version specifier.
368
+
369
+ Handles PEP 508 dependency specifications including:
370
+ - Simple names: "requests"
371
+ - Version specifiers: "requests>=2.28.0"
372
+ - Complex specifiers: "requests>=2.28.0,<3.0.0"
373
+ - Extras: "requests[security]>=2.28.0"
374
+ - Environment markers: "requests>=2.28.0; python_version>='3.8'"
375
+
376
+ Args:
377
+ dependency: Raw dependency string from pyproject.toml
378
+
379
+ Returns:
380
+ Tuple of (package_name, version_specifier)
381
+
382
+ Examples:
383
+ "requests" -> ("requests", "*")
384
+ "requests>=2.28.0" -> ("requests", ">=2.28.0")
385
+ "requests>=2.28.0,<3.0.0" -> ("requests", ">=2.28.0,<3.0.0")
386
+ "requests[security]>=2.28.0" -> ("requests", ">=2.28.0")
387
+ """
388
+ # Remove whitespace
389
+ dependency = dependency.strip()
390
+
391
+ # Handle environment markers (everything after semicolon)
392
+ if ";" in dependency:
393
+ dependency = dependency.split(";")[0].strip()
394
+
395
+ # Pattern to match package name with optional extras and version specifiers
396
+ # Matches: package_name[extras] version_specs
397
+ pattern = r"^([a-zA-Z0-9]([a-zA-Z0-9._-]*[a-zA-Z0-9])?)(\[[^\]]+\])?(.*)"
398
+ match = re.match(pattern, dependency)
399
+
400
+ if not match:
401
+ # Fallback for edge cases
402
+ return dependency, "*"
403
+
404
+ package_name = match.group(1)
405
+ version_part = match.group(4).strip() if match.group(4) else ""
406
+
407
+ # If no version specifier, return wildcard
408
+ if not version_part:
409
+ return package_name, "*"
410
+
411
+ # Clean up version specifier
412
+ version_spec = version_part.strip()
413
+
414
+ # Validate that version specifier starts with a valid operator
415
+ valid_operators = [">=", "<=", "==", "!=", "~=", ">", "<"]
416
+ if not any(version_spec.startswith(op) for op in valid_operators):
417
+ # If it doesn't start with an operator, treat as exact version
418
+ if version_spec:
419
+ version_spec = f"=={version_spec}"
420
+ else:
421
+ version_spec = "*"
422
+
423
+ return package_name, version_spec
424
+
425
+
426
+ def extract_dependencies_from_toml(project_data: Dict) -> Dict[str, str]:
427
+ """Extract and parse dependencies from pyproject.toml project data.
428
+
429
+ Args:
430
+ project_data: The "project" section from pyproject.toml
431
+
432
+ Returns:
433
+ Dictionary mapping package names to version specifiers
434
+ """
435
+ dependencies = {}
436
+
437
+ if "dependencies" not in project_data:
438
+ return dependencies
439
+
440
+ deps_list = project_data["dependencies"]
441
+ if not isinstance(deps_list, list):
442
+ console.warning("dependencies should be a list in pyproject.toml")
443
+ return dependencies
444
+
445
+ for dep in deps_list:
446
+ if not isinstance(dep, str):
447
+ console.warning(f"Skipping non-string dependency: {dep}")
448
+ continue
449
+
450
+ try:
451
+ name, version_spec = parse_dependency_string(dep)
452
+ if name: # Only add if we got a valid name
453
+ dependencies[name] = version_spec
454
+ except Exception as e:
455
+ console.warning(f"Failed to parse dependency '{dep}': {e}")
456
+ continue
457
+
458
+ return dependencies
459
+
460
+
461
+ def read_toml_project(file_path: str) -> dict:
462
+ """Read and parse pyproject.toml file with improved error handling and validation.
463
+
464
+ Args:
465
+ file_path: Path to pyproject.toml file
466
+
467
+ Returns:
468
+ Dictionary containing project metadata and dependencies
469
+ """
470
+ try:
471
+ with open(file_path, "rb") as f:
472
+ content = tomllib.load(f)
473
+ except Exception as e:
474
+ console.error(f"Failed to read or parse pyproject.toml: {e}")
475
+
476
+ # Validate required sections
477
+ if "project" not in content:
478
+ console.error("pyproject.toml is missing the required field: project.")
479
+
480
+ project = content["project"]
481
+
482
+ # Validate required fields with better error messages
483
+ required_fields = {
484
+ "name": "Project name is required in pyproject.toml",
485
+ "description": "Project description is required in pyproject.toml",
486
+ "version": "Project version is required in pyproject.toml",
487
+ }
488
+
489
+ for field, error_msg in required_fields.items():
490
+ if field not in project:
400
491
  console.error(
401
- "pyproject.toml is missing the required field: project.description."
492
+ f"pyproject.toml is missing the required field: project.{field}. {error_msg}"
402
493
  )
403
- if "version" not in content["project"]:
494
+
495
+ # Check for empty values only if field exists
496
+ if field in project and (
497
+ not project[field]
498
+ or (isinstance(project[field], str) and not project[field].strip())
499
+ ):
404
500
  console.error(
405
- "pyproject.toml is missing the required field: project.version."
501
+ f"Project {field} cannot be empty. Please specify a {field} in pyproject.toml."
406
502
  )
407
503
 
408
- return {
409
- "name": content["project"]["name"],
410
- "description": content["project"]["description"],
411
- "version": content["project"]["version"],
412
- "authors": content["project"].get("authors", [{"name": ""}])[0]["name"],
413
- }
504
+ # Extract author information safely
505
+ authors = project.get("authors", [])
506
+ author_name = ""
507
+
508
+ if authors and isinstance(authors, list) and len(authors) > 0:
509
+ first_author = authors[0]
510
+ if isinstance(first_author, dict):
511
+ author_name = first_author.get("name", "")
512
+ elif isinstance(first_author, str):
513
+ # Handle case where authors is a list of strings
514
+ author_name = first_author
515
+
516
+ # Extract dependencies with improved parsing
517
+ dependencies = extract_dependencies_from_toml(project)
518
+
519
+ return {
520
+ "name": project["name"].strip(),
521
+ "description": project["description"].strip(),
522
+ "version": project["version"].strip(),
523
+ "authors": author_name.strip(),
524
+ "dependencies": dependencies,
525
+ }
414
526
 
415
527
 
416
528
  def get_project_version(directory):
@@ -492,6 +604,7 @@ def pack(root, nolock):
492
604
  version or config["version"],
493
605
  config["authors"],
494
606
  root,
607
+ config.get("dependencies"),
495
608
  include_uv_lock=not nolock,
496
609
  )
497
610
  display_project_info(config)
@@ -324,3 +324,150 @@ class TestPack:
324
324
  }
325
325
  assert f"Authors : {', '.join(authors_dict.keys())}" in result.output
326
326
  assert "Project successfully packaged." in result.output
327
+
328
+ def test_dependencies_version_formats(
329
+ self,
330
+ runner: CliRunner,
331
+ temp_dir: str,
332
+ project_details: ProjectDetails,
333
+ uipath_json: UiPathJson,
334
+ ) -> None:
335
+ """Test that all dependency version formats are parsed correctly and included in operate.json."""
336
+
337
+ # Update project details with comprehensive dependency examples
338
+ project_details.dependencies = [
339
+ # Simple package name
340
+ "click",
341
+ # Single version constraints
342
+ "django>=4.0",
343
+ "flask==2.3.0",
344
+ "numpy>1.20.0",
345
+ "pandas<=2.0.0",
346
+ "scipy<1.11.0",
347
+ "matplotlib~=3.5.0",
348
+ "pytest!=7.1.0",
349
+ # Complex version constraints
350
+ "tensorflow>=2.10.0,<2.13.0",
351
+ "torch>=1.12.0,<=1.13.1",
352
+ # Package with extras
353
+ "requests[security]>=2.28.0",
354
+ "sqlalchemy[postgresql,mysql]>=1.4.0",
355
+ # Environment markers (should be stripped)
356
+ "pywin32>=227; sys_platform=='win32'",
357
+ "uvloop>=0.17.0; python_version>='3.8' and sys_platform!='win32'",
358
+ # Complex combination
359
+ "cryptography[ssh]>=3.4.8,<4.0.0; python_version>='3.7'",
360
+ # Edge cases
361
+ "some-package_with.dots_and-dashes>=1.0.0",
362
+ "CamelCasePackage==2.1.0",
363
+ ]
364
+
365
+ with runner.isolated_filesystem(temp_dir=temp_dir):
366
+ # Create necessary files
367
+ with open("uipath.json", "w") as f:
368
+ f.write(uipath_json.to_json())
369
+ with open("pyproject.toml", "w") as f:
370
+ f.write(project_details.to_toml())
371
+
372
+ # Create entry point files
373
+ for entry in uipath_json.entry_points:
374
+ with open(f"{entry.file_path}.py", "w") as f:
375
+ f.write("# agent content")
376
+
377
+ # Run pack command
378
+ result = runner.invoke(pack, ["./"])
379
+
380
+ # Assert pack was successful
381
+ assert result.exit_code == 0, f"Pack failed with output: {result.output}"
382
+ assert "Project successfully packaged." in result.output
383
+
384
+ # Verify package was created
385
+ package_path = (
386
+ f".uipath/{project_details.name}.{project_details.version}.nupkg"
387
+ )
388
+ assert os.path.exists(package_path)
389
+
390
+ # Extract and verify operate.json content
391
+ with zipfile.ZipFile(package_path, "r") as z:
392
+ # Read operate.json
393
+ operate_content = z.read("content/operate.json").decode("utf-8")
394
+ operate_data = json.loads(operate_content)
395
+
396
+ # Verify dependencies exist in operate.json
397
+ assert "dependencies" in operate_data, (
398
+ "Dependencies should be present in operate.json"
399
+ )
400
+
401
+ dependencies = operate_data["dependencies"]
402
+
403
+ # Expected parsed dependencies (name -> version_spec)
404
+ expected_dependencies = {
405
+ # Simple package name
406
+ "click": "*",
407
+ # Single version constraints
408
+ "django": ">=4.0",
409
+ "flask": "==2.3.0",
410
+ "numpy": ">1.20.0",
411
+ "pandas": "<=2.0.0",
412
+ "scipy": "<1.11.0",
413
+ "matplotlib": "~=3.5.0",
414
+ "pytest": "!=7.1.0",
415
+ # Complex version constraints
416
+ "tensorflow": ">=2.10.0,<2.13.0",
417
+ "torch": ">=1.12.0,<=1.13.1",
418
+ # Package with extras (extras should be stripped)
419
+ "requests": ">=2.28.0",
420
+ "sqlalchemy": ">=1.4.0",
421
+ # Environment markers (markers should be stripped)
422
+ "pywin32": ">=227",
423
+ "uvloop": ">=0.17.0",
424
+ # Complex combination (extras and markers stripped)
425
+ "cryptography": ">=3.4.8,<4.0.0",
426
+ # Edge cases
427
+ "some-package_with.dots_and-dashes": ">=1.0.0",
428
+ "CamelCasePackage": "==2.1.0",
429
+ }
430
+
431
+ # Verify all expected dependencies are present
432
+ for package_name, expected_version in expected_dependencies.items():
433
+ assert package_name in dependencies, (
434
+ f"Package '{package_name}' should be in dependencies"
435
+ )
436
+ actual_version = dependencies[package_name]
437
+ assert actual_version == expected_version, (
438
+ f"Package '{package_name}' should have version '{expected_version}', "
439
+ f"but got '{actual_version}'"
440
+ )
441
+
442
+ # Verify no unexpected dependencies
443
+ for package_name in dependencies:
444
+ assert package_name in expected_dependencies, (
445
+ f"Unexpected package '{package_name}' found in dependencies"
446
+ )
447
+
448
+ # Verify specific edge cases
449
+ assert len(dependencies) == len(expected_dependencies), (
450
+ f"Expected {len(expected_dependencies)} dependencies, "
451
+ f"but got {len(dependencies)}"
452
+ )
453
+
454
+ # Test that environment markers were properly stripped
455
+ assert "pywin32" in dependencies
456
+ assert dependencies["pywin32"] == ">=227"
457
+
458
+ # Test that extras were properly stripped but version preserved
459
+ assert "sqlalchemy" in dependencies
460
+ assert dependencies["sqlalchemy"] == ">=1.4.0"
461
+
462
+ # Test complex version constraints are preserved
463
+ assert "tensorflow" in dependencies
464
+ assert dependencies["tensorflow"] == ">=2.10.0,<2.13.0"
465
+
466
+ # Verify operate.json structure is still correct
467
+ assert (
468
+ operate_data["$schema"]
469
+ == "https://cloud.uipath.com/draft/2024-12/entry-point"
470
+ )
471
+ assert "projectId" in operate_data
472
+ assert operate_data["targetRuntime"] == "python"
473
+ assert operate_data["targetFramework"] == "Portable"