uipath 2.0.33__tar.gz → 2.0.34__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 (136) hide show
  1. {uipath-2.0.33 → uipath-2.0.34}/.github/workflows/build.yml +0 -17
  2. uipath-2.0.34/.github/workflows/publish-docs.yml +38 -0
  3. {uipath-2.0.33 → uipath-2.0.34}/.gitignore +3 -0
  4. {uipath-2.0.33 → uipath-2.0.34}/PKG-INFO +1 -1
  5. uipath-2.0.34/docs/assets/favicon.png +0 -0
  6. uipath-2.0.34/docs/release_policy.md +124 -0
  7. {uipath-2.0.33 → uipath-2.0.34}/mkdocs.yml +6 -1
  8. {uipath-2.0.33 → uipath-2.0.34}/pyproject.toml +2 -2
  9. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_new.py +2 -3
  10. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_run.py +29 -12
  11. {uipath-2.0.33 → uipath-2.0.34}/uv.lock +1651 -1517
  12. {uipath-2.0.33 → uipath-2.0.34}/.cursorrules +0 -0
  13. {uipath-2.0.33 → uipath-2.0.34}/.editorconfig +0 -0
  14. {uipath-2.0.33 → uipath-2.0.34}/.gitattributes +0 -0
  15. {uipath-2.0.33 → uipath-2.0.34}/.github/workflows/cd.yml +0 -0
  16. {uipath-2.0.33 → uipath-2.0.34}/.github/workflows/ci.yml +0 -0
  17. {uipath-2.0.33 → uipath-2.0.34}/.github/workflows/commitlint.yml +0 -0
  18. {uipath-2.0.33 → uipath-2.0.34}/.github/workflows/lint.yml +0 -0
  19. {uipath-2.0.33 → uipath-2.0.34}/.github/workflows/publish-dev.yml +0 -0
  20. {uipath-2.0.33 → uipath-2.0.34}/.github/workflows/test.yml +0 -0
  21. {uipath-2.0.33 → uipath-2.0.34}/.pre-commit-config.yaml +0 -0
  22. {uipath-2.0.33 → uipath-2.0.34}/.python-version +0 -0
  23. {uipath-2.0.33 → uipath-2.0.34}/.vscode/extensions.json +0 -0
  24. {uipath-2.0.33 → uipath-2.0.34}/.vscode/settings.json +0 -0
  25. {uipath-2.0.33 → uipath-2.0.34}/CONTRIBUTING.md +0 -0
  26. {uipath-2.0.33 → uipath-2.0.34}/LICENSE +0 -0
  27. {uipath-2.0.33 → uipath-2.0.34}/README.md +0 -0
  28. {uipath-2.0.33 → uipath-2.0.34}/docs/CONTRIBUTING.md +0 -0
  29. {uipath-2.0.33 → uipath-2.0.34}/docs/assets/uipath-logo.svg +0 -0
  30. {uipath-2.0.33 → uipath-2.0.34}/docs/core/actions.md +0 -0
  31. {uipath-2.0.33 → uipath-2.0.34}/docs/core/assets.md +0 -0
  32. {uipath-2.0.33 → uipath-2.0.34}/docs/core/buckets.md +0 -0
  33. {uipath-2.0.33 → uipath-2.0.34}/docs/core/context_grounding.md +0 -0
  34. {uipath-2.0.33 → uipath-2.0.34}/docs/core/getting_started.md +0 -0
  35. {uipath-2.0.33 → uipath-2.0.34}/docs/core/index.md +0 -0
  36. {uipath-2.0.33 → uipath-2.0.34}/docs/core/jobs.md +0 -0
  37. {uipath-2.0.33 → uipath-2.0.34}/docs/core/processes.md +0 -0
  38. {uipath-2.0.33 → uipath-2.0.34}/docs/core/queues.md +0 -0
  39. {uipath-2.0.33 → uipath-2.0.34}/docs/hooks.py +0 -0
  40. {uipath-2.0.33 → uipath-2.0.34}/docs/langchain/chat_models.md +0 -0
  41. {uipath-2.0.33 → uipath-2.0.34}/docs/langchain/context_grounding.md +0 -0
  42. {uipath-2.0.33 → uipath-2.0.34}/docs/langchain/human_in_the_loop.md +0 -0
  43. {uipath-2.0.33 → uipath-2.0.34}/docs/langchain/index.md +0 -0
  44. {uipath-2.0.33 → uipath-2.0.34}/docs/stylesheets/extra.css +0 -0
  45. {uipath-2.0.33 → uipath-2.0.34}/justfile +0 -0
  46. {uipath-2.0.33 → uipath-2.0.34}/py.typed +0 -0
  47. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/__init__.py +0 -0
  48. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/README.md +0 -0
  49. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/__init__.py +0 -0
  50. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/_auth_server.py +0 -0
  51. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/_models.py +0 -0
  52. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
  53. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/_portal_service.py +0 -0
  54. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/_utils.py +0 -0
  55. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/auth_config.json +0 -0
  56. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/index.html +0 -0
  57. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/localhost.crt +0 -0
  58. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_auth/localhost.key +0 -0
  59. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_runtime/_contracts.py +0 -0
  60. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_runtime/_logging.py +0 -0
  61. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_runtime/_runtime.py +0 -0
  62. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
  63. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_templates/.rels.template +0 -0
  64. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
  65. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_templates/main.py.template +0 -0
  66. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
  67. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_utils/_common.py +0 -0
  68. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_utils/_console.py +0 -0
  69. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_utils/_folders.py +0 -0
  70. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_utils/_input_args.py +0 -0
  71. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
  72. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/_utils/_processes.py +0 -0
  73. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_auth.py +0 -0
  74. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_deploy.py +0 -0
  75. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_init.py +0 -0
  76. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_invoke.py +0 -0
  77. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_pack.py +0 -0
  78. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/cli_publish.py +0 -0
  79. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/middlewares.py +0 -0
  80. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_cli/spinner.py +0 -0
  81. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_config.py +0 -0
  82. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_execution_context.py +0 -0
  83. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_folder_context.py +0 -0
  84. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/__init__.py +0 -0
  85. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/_base_service.py +0 -0
  86. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/actions_service.py +0 -0
  87. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/api_client.py +0 -0
  88. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/assets_service.py +0 -0
  89. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/buckets_service.py +0 -0
  90. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/connections_service.py +0 -0
  91. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/connections_service.pyi +0 -0
  92. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/context_grounding_service.py +0 -0
  93. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/folder_service.py +0 -0
  94. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/jobs_service.py +0 -0
  95. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/llm_gateway_service.py +0 -0
  96. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/processes_service.py +0 -0
  97. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_services/queues_service.py +0 -0
  98. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_uipath.py +0 -0
  99. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/__init__.py +0 -0
  100. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/_endpoint.py +0 -0
  101. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/_infer_bindings.py +0 -0
  102. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/_logs.py +0 -0
  103. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/_request_override.py +0 -0
  104. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/_request_spec.py +0 -0
  105. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/_user_agent.py +0 -0
  106. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/_utils/constants.py +0 -0
  107. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/__init__.py +0 -0
  108. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/action_schema.py +0 -0
  109. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/actions.py +0 -0
  110. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/assets.py +0 -0
  111. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/connections.py +0 -0
  112. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/context_grounding.py +0 -0
  113. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/context_grounding_index.py +0 -0
  114. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/errors.py +0 -0
  115. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/exceptions.py +0 -0
  116. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/interrupt_models.py +0 -0
  117. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/job.py +0 -0
  118. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/llm_gateway.py +0 -0
  119. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/processes.py +0 -0
  120. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/models/queues.py +0 -0
  121. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/py.typed +0 -0
  122. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/tracing/__init__.py +0 -0
  123. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/tracing/_otel_exporters.py +0 -0
  124. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/tracing/_traced.py +0 -0
  125. {uipath-2.0.33 → uipath-2.0.34}/src/uipath/tracing/_utils.py +0 -0
  126. {uipath-2.0.33 → uipath-2.0.34}/tests/__init__.py +0 -0
  127. {uipath-2.0.33 → uipath-2.0.34}/tests/cli/test_init.py +0 -0
  128. {uipath-2.0.33 → uipath-2.0.34}/tests/conftest.py +0 -0
  129. {uipath-2.0.33 → uipath-2.0.34}/tests/sdk/services/test_llm_integration.py +0 -0
  130. {uipath-2.0.33 → uipath-2.0.34}/tests/sdk/services/test_llm_service.py +0 -0
  131. {uipath-2.0.33 → uipath-2.0.34}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
  132. {uipath-2.0.33 → uipath-2.0.34}/tests/sdk/test_config.py +0 -0
  133. {uipath-2.0.33 → uipath-2.0.34}/tests/tracing/test_otel_exporters.py +0 -0
  134. {uipath-2.0.33 → uipath-2.0.34}/tests/tracing/test_span_utils.py +0 -0
  135. {uipath-2.0.33 → uipath-2.0.34}/tests/tracing/test_traced.py +0 -0
  136. {uipath-2.0.33 → uipath-2.0.34}/tests/tracing/test_tracing_manager.py +0 -0
@@ -46,20 +46,3 @@ jobs:
46
46
  uv publish
47
47
  env:
48
48
  UV_PUBLISH_TOKEN: ${{ secrets.token }}
49
-
50
- - name: Clone plugins
51
- if: ${{ steps.check_version.outputs.modified }} == 'true'
52
- run: |
53
- git clone https://x-access-token:${{ secrets.repo_access }}@github.com/UiPath/uipath-langchain-python plugins/uipath-langchain-python
54
-
55
- - name: Symlink plugin docs
56
- if: ${{ steps.check_version.outputs.modified }} == 'true'
57
- run: |
58
- mkdir -p docs/plugins
59
- ln -s ../../plugins/uipath-langchain-python docs/plugins/uipath-langchain-python
60
-
61
- - name: Publish Docs
62
- if: ${{ steps.check_version.outputs.modified }} == 'true'
63
- run: |
64
- ls -la docs
65
- uv run mkdocs gh-deploy --force
@@ -0,0 +1,38 @@
1
+ name: Publish Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ publish-docs:
10
+ runs-on: "ubuntu-24.04"
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ - uses: astral-sh/setup-uv@v5
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version-file: ".python-version"
20
+
21
+ - name: Setup venv
22
+ run: |
23
+ uv venv
24
+ uv sync --all-extras
25
+
26
+ - name: Clone plugins
27
+ run: |
28
+ git clone https://x-access-token:${{ secrets.REPO_ACCESS }}@github.com/UiPath/uipath-langchain-python plugins/uipath-langchain-python
29
+
30
+ - name: Symlink plugin docs
31
+ run: |
32
+ mkdir -p docs/plugins
33
+ ln -s ../../plugins/uipath-langchain-python docs/plugins/uipath-langchain-python
34
+
35
+ - name: Publish Docs
36
+ run: |
37
+ ls -la docs
38
+ uv run mkdocs gh-deploy --force
@@ -23,3 +23,6 @@ wheels/
23
23
  **/docs/plugins/.*
24
24
  **/docs/quick_start_images/*
25
25
  **/docs/quick_start_images/.*
26
+
27
+ .cache/*
28
+ .cache
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.33
3
+ Version: 2.0.34
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
Binary file
@@ -0,0 +1,124 @@
1
+ # Release Policy
2
+
3
+ The UiPath Python ecosystem is composed of different component packages:
4
+
5
+ - `uipath`: The core SDK package (version >= 2.0.0)
6
+ - `uipath-langchain`: The LangChain integration package (version >= 0.0.0)
7
+
8
+ Both packages are under rapid development, following semantic versioning in the format of **X.Y.Z**:
9
+
10
+ - **X** (major version):
11
+ - `uipath`: X = 2
12
+ - `uipath-langchain`: X = 0
13
+ - **Y** (minor version) increases indicate breaking changes for public interfaces not marked as beta
14
+ - **Z** (patch version) increases indicate:
15
+ - Bug fixes
16
+ - New features
17
+ - Changes to private interfaces
18
+ - Changes to beta features
19
+
20
+ ### Version Number Format
21
+
22
+ The version format is `X.Y.Z` where:
23
+
24
+ - For `uipath`: X = 2 (e.g., 2.0.0, 2.1.0)
25
+ - For `uipath-langchain`: X = 0 (e.g., 0.0.0, 0.1.0)
26
+ - Y represents the minor version
27
+ - Z represents the patch version
28
+
29
+ ### Release Candidates
30
+
31
+ From time to time, we will version packages as release candidates. These are versions that are intended to be released as stable versions, but we want to get feedback from the community before doing so.
32
+
33
+ Release candidates are versioned as `X.Y.ZrcN`. For example:
34
+
35
+ - `uipath`: `2.2.0rc1`
36
+ - `uipath-langchain`: `0.1.0rc1`
37
+
38
+ If no issues are found, the release candidate will be released as a stable version with the same version number. If issues are found, we will release a new release candidate with an incremented N value (e.g., `2.2.0rc2` or `0.1.0rc2`).
39
+
40
+ When upgrading between minor versions, users should review the list of breaking changes and deprecations.
41
+
42
+ ## Release Cadence
43
+
44
+ ### Minor Releases (X.Y.0)
45
+
46
+ - Released as needed based on feature development and breaking changes
47
+ - Include breaking changes for public interfaces not marked as beta
48
+ - Require a migration guide for users
49
+ - Preceded by a release candidate (RC) phase
50
+
51
+ ### Patch Releases (X.Y.Z)
52
+
53
+ - Released as needed based on bug fixes and improvements
54
+ - Include bug fixes, new features, and changes to private interfaces
55
+ - Always maintain backward compatibility for public interfaces
56
+
57
+ ## API Stability
58
+
59
+ ### Public API
60
+ The following components are considered part of the public API:
61
+
62
+ - All classes and methods in the `src/uipath` directory
63
+ - CLI commands and their interfaces
64
+
65
+ ### Internal API
66
+ Components marked as internal include:
67
+
68
+ - Methods and classes prefixed with `_`
69
+ - Test utilities and fixtures
70
+ - Build and development tools
71
+
72
+ ## Breaking Changes
73
+
74
+ Breaking changes are introduced in minor releases (X.Y.0) and follow these guidelines:
75
+
76
+ 1. **Deprecation Period**: Features marked for removal will be deprecated for at least one minor release cycle
77
+ 2. **Migration Path**: Breaking changes must provide a clear migration path
78
+ 3. **Documentation**: All breaking changes must be documented in the release notes and migration guide
79
+ 4. **Beta Features**: Breaking changes to beta features can occur in patch releases
80
+
81
+ ## Deprecation Policy
82
+
83
+ 1. **Announcement**: Features to be deprecated will be announced in release notes
84
+ 2. **Warning Period**: Deprecated features will trigger warnings when used
85
+ 3. **Removal**: Deprecated features will be removed in the next major release
86
+
87
+ ## Release Process
88
+
89
+ 1. **Development**:
90
+ - Features and fixes are developed in feature branches
91
+ - All changes require tests and documentation
92
+ - Code must pass all CI checks
93
+
94
+ 2. **Release Candidate**:
95
+ - Minor releases include an RC phase
96
+ - RCs are versioned as `X.Y.ZrcN`
97
+ - Community feedback is collected during RC phase
98
+
99
+ 3. **Release**:
100
+ - Version number is updated in `pyproject.toml`
101
+ - Release notes are prepared
102
+ - Package is published to PyPI
103
+ - Documentation is updated
104
+
105
+ ## Support Policy
106
+
107
+ - Current major version: Full support
108
+ - Previous major version: Security fixes only
109
+ - Older versions: No official support
110
+
111
+ ## Dependencies
112
+
113
+ The SDK maintains compatibility with:
114
+
115
+ - Python 3.10+
116
+ - Key dependencies as specified in `pyproject.toml`
117
+ - Regular updates to dependencies are performed in minor releases
118
+
119
+ ## Documentation
120
+
121
+ - All public APIs must be documented
122
+ - Documentation follows Google-style docstrings
123
+ - Examples and usage guides are provided for new features
124
+ - Breaking changes are clearly documented in migration guides
@@ -43,6 +43,7 @@ theme:
43
43
  - search.suggest
44
44
  - toc.follow
45
45
  logo: assets/uipath-logo.svg
46
+ favicon: assets/favicon.png
46
47
 
47
48
  nav:
48
49
  - UiPath Langchain SDK:
@@ -63,6 +64,7 @@ nav:
63
64
  - Queues: core/queues.md
64
65
  - Processes: core/processes.md
65
66
  - How To Contribute: CONTRIBUTING.md
67
+ - Release Policy: release_policy.md
66
68
 
67
69
  plugins:
68
70
  - search
@@ -74,7 +76,7 @@ plugins:
74
76
  prompt_literal_start:
75
77
  - "$"
76
78
  - ">"
77
-
79
+ - social
78
80
  markdown_extensions:
79
81
  - attr_list
80
82
  - md_in_html
@@ -102,5 +104,8 @@ markdown_extensions:
102
104
  - pymdownx.inlinehilite
103
105
  - pymdownx.magiclink
104
106
  - pymdownx.snippets
107
+ - pymdownx.fancylists
105
108
  - pymdownx.tabbed:
106
109
  alternate_style: true
110
+ - toc:
111
+ title: On this page
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "uipath"
3
- version = "2.0.33"
3
+ version = "2.0.34"
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"
@@ -53,7 +53,7 @@ dev = [
53
53
  "pytest-mock>=3.11.1",
54
54
  "pre-commit>=4.1.0",
55
55
  "mkdocs>=1.6.1",
56
- "mkdocs-material>=9.6.7",
56
+ "mkdocs-material[imaging]>=9.6.7",
57
57
  "mkdocstrings>=0.29.0",
58
58
  "mkdocstrings-python>=1.16.5",
59
59
  "termynal>=0.13.0",
@@ -68,9 +68,8 @@ def new(name: str):
68
68
  ctx = click.get_current_context()
69
69
  init_cmd = ctx.parent.command.get_command(ctx, "init")
70
70
  ctx.invoke(init_cmd)
71
- console.hint(
72
- """Run project: uipath run main.py '{"message": "Hello World!"}'"""
73
- )
71
+ run_command = """uipath run main.py '{"message": "Hello World!"}'"""
72
+ console.hint(f"""Run project: {click.style(run_command, fg="cyan")}""")
74
73
 
75
74
 
76
75
  if __name__ == "__main__":
@@ -1,6 +1,5 @@
1
1
  # type: ignore
2
2
  import asyncio
3
- import logging
4
3
  import os
5
4
  import traceback
6
5
  from os import environ as env
@@ -16,9 +15,10 @@ from ._runtime._contracts import (
16
15
  UiPathTraceContext,
17
16
  )
18
17
  from ._runtime._runtime import UiPathRuntime
18
+ from ._utils._console import ConsoleLogger
19
19
  from .middlewares import MiddlewareResult, Middlewares
20
20
 
21
- logger = logging.getLogger(__name__)
21
+ console = ConsoleLogger()
22
22
  load_dotenv()
23
23
 
24
24
 
@@ -39,14 +39,14 @@ def python_run_middleware(
39
39
  return MiddlewareResult(
40
40
  should_continue=False,
41
41
  info_message="""Error: No entrypoint specified. Please provide a path to a Python script.
42
- Usage: `uipath run <entrypoint_path> <input_arguments>`""",
42
+ Usage: `uipath run <entrypoint_path> <input_arguments> [-f <input_json_file_path>]`""",
43
43
  )
44
44
 
45
45
  if not os.path.exists(entrypoint):
46
46
  return MiddlewareResult(
47
47
  should_continue=False,
48
48
  error_message=f"""Error: Script not found at path {entrypoint}.
49
- Usage: `uipath run <entrypoint_path> <input_arguments>`""",
49
+ Usage: `uipath run <entrypoint_path> <input_arguments> [-f <input_json_file_path>]`""",
50
50
  )
51
51
 
52
52
  try:
@@ -74,7 +74,6 @@ Usage: `uipath run <entrypoint_path> <input_arguments>`""",
74
74
  reference_id=env.get("UIPATH_JOB_KEY") or str(uuid4()),
75
75
  )
76
76
  context.logs_min_level = env.get("LOG_LEVEL", "INFO")
77
-
78
77
  async with UiPathRuntime.from_context(context) as runtime:
79
78
  await runtime.execute()
80
79
 
@@ -91,7 +90,6 @@ Usage: `uipath run <entrypoint_path> <input_arguments>`""",
91
90
  )
92
91
  except Exception as e:
93
92
  # Handle unexpected errors
94
- logger.exception("Unexpected error in Python runtime middleware")
95
93
  return MiddlewareResult(
96
94
  should_continue=False,
97
95
  error_message=f"Error: Unexpected error occurred - {str(e)}",
@@ -103,8 +101,23 @@ Usage: `uipath run <entrypoint_path> <input_arguments>`""",
103
101
  @click.argument("entrypoint", required=False)
104
102
  @click.argument("input", required=False, default="{}")
105
103
  @click.option("--resume", is_flag=True, help="Resume execution from a previous state")
106
- def run(entrypoint: Optional[str], input: Optional[str], resume: bool) -> None:
104
+ @click.option(
105
+ "-f",
106
+ "--file",
107
+ required=False,
108
+ type=click.Path(exists=True),
109
+ help="File path for the .json input",
110
+ )
111
+ def run(
112
+ entrypoint: Optional[str], input: Optional[str], resume: bool, file: Optional[str]
113
+ ) -> None:
107
114
  """Execute the project."""
115
+ if file:
116
+ _, file_extension = os.path.splitext(file)
117
+ if file_extension != ".json":
118
+ console.error("Input file extension must be '.json'.")
119
+ with open(file) as f:
120
+ input = f.read()
108
121
  # Process through middleware chain
109
122
  result = Middlewares.next("run", entrypoint, input, resume)
110
123
 
@@ -115,18 +128,22 @@ def run(entrypoint: Optional[str], input: Optional[str], resume: bool) -> None:
115
128
 
116
129
  # Handle result from middleware
117
130
  if result.error_message:
118
- click.echo(result.error_message, err=True)
131
+ console.error(result.error_message, include_traceback=True)
119
132
  if result.should_include_stacktrace:
120
- click.echo(traceback.format_exc(), err=True)
133
+ console.error(traceback.format_exc())
121
134
  click.get_current_context().exit(1)
122
135
 
123
136
  if result.info_message:
124
- click.echo(result.info_message)
137
+ console.info(result.info_message)
125
138
 
126
139
  # If middleware chain completed but didn't handle the request
127
140
  if result.should_continue:
128
- click.echo("Error: Could not process the request with any available handler.")
129
- click.get_current_context().exit(1)
141
+ console.error(
142
+ "Error: Could not process the request with any available handler."
143
+ )
144
+
145
+ if not result.should_continue and not result.error_message:
146
+ console.success("Successful execution.")
130
147
 
131
148
 
132
149
  if __name__ == "__main__":