uipath 2.0.19.dev1002910021__tar.gz → 2.0.19.dev1002910037__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 (126) hide show
  1. uipath-2.0.19.dev1002910037/.github/workflows/publish-dev.yml +105 -0
  2. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/PKG-INFO +1 -1
  3. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/pyproject.toml +1 -1
  4. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/cli_pack.py +16 -9
  5. uipath-2.0.19.dev1002910021/.github/workflows/publish-dev.yml +0 -116
  6. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.cursorrules +0 -0
  7. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.editorconfig +0 -0
  8. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.gitattributes +0 -0
  9. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.github/workflows/build.yml +0 -0
  10. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.github/workflows/cd.yml +0 -0
  11. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.github/workflows/ci.yml +0 -0
  12. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.github/workflows/commitlint.yml +0 -0
  13. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.github/workflows/lint.yml +0 -0
  14. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.github/workflows/test.yml +0 -0
  15. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.gitignore +0 -0
  16. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.pre-commit-config.yaml +0 -0
  17. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.python-version +0 -0
  18. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.vscode/extensions.json +0 -0
  19. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/.vscode/settings.json +0 -0
  20. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/CONTRIBUTING.md +0 -0
  21. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/LICENSE +0 -0
  22. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/README.md +0 -0
  23. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/CONTRIBUTING.md +0 -0
  24. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/actions.md +0 -0
  25. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/assets/uipath-logo.svg +0 -0
  26. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/assets.md +0 -0
  27. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/buckets.md +0 -0
  28. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/connections.md +0 -0
  29. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/context_grounding.md +0 -0
  30. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/getting_started_agent.md +0 -0
  31. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/getting_started_cli.md +0 -0
  32. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/getting_started_sdk.md +0 -0
  33. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/index.md +0 -0
  34. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/jobs.md +0 -0
  35. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/processes.md +0 -0
  36. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/queues.md +0 -0
  37. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/docs/sdk.md +0 -0
  38. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/justfile +0 -0
  39. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/mkdocs.yml +0 -0
  40. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/py.typed +0 -0
  41. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/__init__.py +0 -0
  42. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/README.md +0 -0
  43. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/__init__.py +0 -0
  44. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/_auth_server.py +0 -0
  45. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/_models.py +0 -0
  46. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
  47. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/_portal_service.py +0 -0
  48. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/_utils.py +0 -0
  49. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/auth_config.json +0 -0
  50. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/index.html +0 -0
  51. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/localhost.crt +0 -0
  52. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_auth/localhost.key +0 -0
  53. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_runtime/_contracts.py +0 -0
  54. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_runtime/_logging.py +0 -0
  55. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_runtime/_runtime.py +0 -0
  56. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
  57. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_templates/.rels.template +0 -0
  58. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
  59. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_templates/main.py.template +0 -0
  60. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
  61. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_utils/_common.py +0 -0
  62. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_utils/_input_args.py +0 -0
  63. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
  64. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/cli_auth.py +0 -0
  65. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/cli_deploy.py +0 -0
  66. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/cli_init.py +0 -0
  67. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/cli_new.py +0 -0
  68. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/cli_publish.py +0 -0
  69. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/cli_run.py +0 -0
  70. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_cli/middlewares.py +0 -0
  71. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_config.py +0 -0
  72. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_execution_context.py +0 -0
  73. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_folder_context.py +0 -0
  74. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/__init__.py +0 -0
  75. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/_base_service.py +0 -0
  76. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/actions_service.py +0 -0
  77. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/api_client.py +0 -0
  78. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/assets_service.py +0 -0
  79. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/buckets_service.py +0 -0
  80. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/connections_service.py +0 -0
  81. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/connections_service.pyi +0 -0
  82. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/context_grounding_service.py +0 -0
  83. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/folder_service.py +0 -0
  84. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/jobs_service.py +0 -0
  85. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/llm_gateway_service.py +0 -0
  86. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/processes_service.py +0 -0
  87. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_services/queues_service.py +0 -0
  88. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_uipath.py +0 -0
  89. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/__init__.py +0 -0
  90. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/_endpoint.py +0 -0
  91. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/_infer_bindings.py +0 -0
  92. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/_logs.py +0 -0
  93. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/_request_override.py +0 -0
  94. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/_request_spec.py +0 -0
  95. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/_user_agent.py +0 -0
  96. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/_utils/constants.py +0 -0
  97. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/__init__.py +0 -0
  98. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/action_schema.py +0 -0
  99. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/actions.py +0 -0
  100. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/assets.py +0 -0
  101. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/connections.py +0 -0
  102. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/context_grounding.py +0 -0
  103. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/context_grounding_index.py +0 -0
  104. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/exceptions.py +0 -0
  105. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/interrupt_models.py +0 -0
  106. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/job.py +0 -0
  107. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/llm_gateway.py +0 -0
  108. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/processes.py +0 -0
  109. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/models/queues.py +0 -0
  110. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/py.typed +0 -0
  111. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/tracing/__init__.py +0 -0
  112. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/tracing/_otel_exporters.py +0 -0
  113. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/tracing/_traced.py +0 -0
  114. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/src/uipath/tracing/_utils.py +0 -0
  115. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/__init__.py +0 -0
  116. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/cli/test_init.py +0 -0
  117. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/conftest.py +0 -0
  118. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/sdk/services/test_llm_integration.py +0 -0
  119. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/sdk/services/test_llm_service.py +0 -0
  120. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
  121. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/sdk/test_config.py +0 -0
  122. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/tracing/test_otel_exporters.py +0 -0
  123. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/tracing/test_span_utils.py +0 -0
  124. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/tracing/test_traced.py +0 -0
  125. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/tests/tracing/test_tracing_manager.py +0 -0
  126. {uipath-2.0.19.dev1002910021 → uipath-2.0.19.dev1002910037}/uv.lock +0 -0
@@ -0,0 +1,105 @@
1
+ name: Publish Dev Build
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened, labeled]
6
+ secrets:
7
+ PYPI_TOKEN:
8
+ required: true
9
+
10
+
11
+ jobs:
12
+ publish-dev:
13
+ runs-on: ubuntu-latest
14
+
15
+ # Only run if PR has the build:dev label
16
+ if: contains(github.event.pull_request.labels.*.name, 'build:dev')
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - uses: astral-sh/setup-uv@v5
22
+
23
+ - uses: actions/setup-python@v5
24
+ with:
25
+ python-version-file: ".python-version"
26
+
27
+ - name: Setup venv
28
+ run: |
29
+ uv venv
30
+ uv sync --all-extras
31
+
32
+ - name: Install dependencies
33
+ run: |
34
+ uv add twine
35
+
36
+ - name: Set development version
37
+ shell: pwsh
38
+ env:
39
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40
+ run: |
41
+ $pyprojcontent = Get-Content pyproject.toml -Raw
42
+
43
+ $PROJECT_NAME = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?name\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
44
+ $CURRENT_VERSION = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?version\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
45
+
46
+ # Get PR number and run number with proper padding
47
+ $PR_NUM = [int]"${{ github.event.pull_request.number }}"
48
+ $PADDED_PR = "{0:D5}" -f [int]"${{ github.event.pull_request.number }}"
49
+ $PADDED_RUN = "{0:D4}" -f [int]"${{ github.run_number }}"
50
+ $PADDED_NEXT_PR = "{0:D5}" -f ($PR_NUM + 1)
51
+
52
+ # Create version range strings for PR
53
+ $MIN_VERSION = "$CURRENT_VERSION.dev1$PADDED_PR" + "000"
54
+ $MAX_VERSION = "$CURRENT_VERSION.dev1$PADDED_NEXT_PR" + "000"
55
+
56
+ # Create unique dev version with PR number and run ID
57
+ $DEV_VERSION = "$CURRENT_VERSION.dev1$PADDED_PR$PADDED_RUN"
58
+
59
+ # Update version in pyproject.toml
60
+ (Get-Content pyproject.toml) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content pyproject.toml
61
+
62
+ Write-Output "Package version set to $DEV_VERSION"
63
+
64
+ $dependencyMessage = @"
65
+ - Add this package as a dependency in your pyproject.toml:
66
+
67
+ ``````toml
68
+ [project]
69
+ dependencies = [
70
+ # Exact version:
71
+ "$PROJECT_NAME==$DEV_VERSION",
72
+
73
+ # Any version from PR
74
+ "$PROJECT_NAME>=$MIN_VERSION,<$MAX_VERSION"
75
+ ]
76
+ ``````
77
+ "@
78
+ Write-Output $dependencyMessage
79
+
80
+ # Post comment to GitHub PR
81
+ $owner = "${{ github.repository_owner }}"
82
+ $repo = "${{ github.repository }}".Split('/')[1]
83
+ $issueNumber = $PR_NUM
84
+
85
+ $body = @{
86
+ body = $dependencyMessage
87
+ } | ConvertTo-Json
88
+
89
+ # Create the comment using GitHub REST API
90
+ $uri = "https://api.github.com/repos/$owner/$repo/issues/$issueNumber/comments"
91
+ $headers = @{
92
+ Authorization = "token $env:GITHUB_TOKEN"
93
+ Accept = "application/vnd.github.v3+json"
94
+ }
95
+
96
+ Invoke-RestMethod -Uri $uri -Method Post -Body $body -Headers $headers -ContentType "application/json"
97
+
98
+ - name: Build package
99
+ run: uv build
100
+
101
+ - name: Publish
102
+ run: |
103
+ uv publish
104
+ env:
105
+ UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath
3
- Version: 2.0.19.dev1002910021
3
+ Version: 2.0.19.dev1002910037
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "uipath"
3
- version = "2.0.19.dev1002910021"
3
+ version = "2.0.19.dev1002910037"
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"
@@ -209,6 +209,8 @@ def pack_fn(projectName, description, entryPoints, version, authors, directory):
209
209
  # Define the allowlist of file extensions to include
210
210
  file_extensions_included = [".py", ".mermaid", ".json", ".yaml", ".yml"]
211
211
  files_included = []
212
+ # Binary files that should be read in binary mode
213
+ binary_extensions = [".exe", ""]
212
214
 
213
215
  with open(config_path, "r") as f:
214
216
  config_data = json.load(f)
@@ -266,19 +268,24 @@ def pack_fn(projectName, description, entryPoints, version, authors, directory):
266
268
  if file_extension in file_extensions_included or file in files_included:
267
269
  file_path = os.path.join(root, file)
268
270
  rel_path = os.path.relpath(file_path, directory)
269
- try:
270
- # Try UTF-8 first
271
- with open(file_path, "r", encoding="utf-8") as f:
271
+ if file_extension in binary_extensions:
272
+ # Read binary files in binary mode
273
+ with open(file_path, "rb") as f:
272
274
  z.writestr(f"content/{rel_path}", f.read())
273
- except UnicodeDecodeError:
274
- # If UTF-8 fails, try with utf-8-sig (for files with BOM)
275
+ else:
275
276
  try:
276
- with open(file_path, "r", encoding="utf-8-sig") as f:
277
+ # Try UTF-8 first
278
+ with open(file_path, "r", encoding="utf-8") as f:
277
279
  z.writestr(f"content/{rel_path}", f.read())
278
280
  except UnicodeDecodeError:
279
- # If that also fails, try with latin-1 as a fallback
280
- with open(file_path, "r", encoding="latin-1") as f:
281
- z.writestr(f"content/{rel_path}", f.read())
281
+ # If UTF-8 fails, try with utf-8-sig (for files with BOM)
282
+ try:
283
+ with open(file_path, "r", encoding="utf-8-sig") as f:
284
+ z.writestr(f"content/{rel_path}", f.read())
285
+ except UnicodeDecodeError:
286
+ # If that also fails, try with latin-1 as a fallback
287
+ with open(file_path, "r", encoding="latin-1") as f:
288
+ z.writestr(f"content/{rel_path}", f.read())
282
289
 
283
290
  optional_files = ["pyproject.toml", "README.md"]
284
291
  for file in optional_files:
@@ -1,116 +0,0 @@
1
- name: Publish to Azure DevOps Feed
2
-
3
- on:
4
- pull_request:
5
- types: [opened, synchronize, reopened, labeled]
6
- secrets:
7
- AZURE_ARTIFACTS_USERNAME:
8
- required: true
9
- AZURE_ARTIFACTS_PASSWORD:
10
- required: true
11
- AZURE_ARTIFACTS_URL:
12
- required: true
13
- PYPI_TOKEN:
14
- required: true
15
-
16
-
17
- jobs:
18
- publish-dev:
19
- runs-on: ubuntu-latest
20
-
21
- # Only run if PR has the build:dev label
22
- if: contains(github.event.pull_request.labels.*.name, 'build:dev')
23
-
24
- steps:
25
- - uses: actions/checkout@v4
26
-
27
- - uses: astral-sh/setup-uv@v5
28
-
29
- - uses: actions/setup-python@v5
30
- with:
31
- python-version-file: ".python-version"
32
-
33
- - name: Setup venv
34
- run: |
35
- uv venv
36
- uv sync --all-extras
37
-
38
- - name: Install dependencies
39
- run: |
40
- uv add twine
41
-
42
- - name: Set development version
43
- shell: pwsh
44
- run: |
45
- # Extract current version from pyproject.toml
46
- $null = (Get-Content pyproject.toml -Raw) -match '(?m)^\[(project|tool\.poetry)\][^\[]*?version\s*=\s*"([^"]*)"'
47
- $CURRENT_VERSION = $Matches[2]
48
- # Get PR number and run number with proper padding
49
- $PADDED_PR = "{0:D5}" -f [int]"${{ github.event.pull_request.number }}"
50
- $PADDED_RUN = "{0:D4}" -f [int]"${{ github.run_number }}"
51
-
52
- # Create unique dev version with PR number and run ID
53
- # $DEV_VERSION = "$CURRENT_VERSION.dev0+pr.$PR_NUM.$RUN_ID"
54
- # $DEV_VERSION = "$CURRENT_VERSION.dev$PR_NUM.$RUN_ID"
55
- $DEV_VERSION = "$CURRENT_VERSION.dev1$PADDED_PR$PADDED_RUN"
56
-
57
- # Update version in pyproject.toml
58
- (Get-Content pyproject.toml) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content pyproject.toml
59
-
60
- Write-Output "Package version set to $DEV_VERSION"
61
-
62
- - name: Build package
63
- run: uv build
64
-
65
- - name: Publish
66
- run: |
67
- uv publish
68
- env:
69
- UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
70
-
71
- # - name: Publish to Azure DevOps
72
- # shell: pwsh
73
- # env:
74
- # TWINE_USERNAME: ${{ secrets.AZURE_ARTIFACTS_USERNAME }}
75
- # TWINE_PASSWORD: ${{ secrets.AZURE_ARTIFACTS_PASSWORD }}
76
- # TWINE_REPOSITORY_URL: ${{ secrets.AZURE_ARTIFACTS_URL }}
77
- # run: |
78
- # uv run twine upload dist/*
79
-
80
- # # Output installation instructions
81
- # $VERSION = (Get-Content pyproject.toml | Select-String -Pattern 'version = "([^"]*)"').Matches.Groups[1].Value
82
- # $FEED_URL = "${{ secrets.AZURE_ARTIFACTS_URL }}" -replace "/upload", "/simple"
83
-
84
- # $message = @"
85
- # Example usage in pyproject.toml:
86
- # [project]
87
- # dependencies = [
88
- # "uipath==$VERSION"
89
- # ]
90
- # "@
91
-
92
- # Write-Host $message
93
-
94
- # - name: Publish to TestPyPI
95
- # shell: pwsh
96
- # env:
97
- # TWINE_USERNAME: __token__
98
- # TWINE_PASSWORD: ${{ secrets.TESTPYPI_TOKEN }}
99
- # TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
100
- # run: |
101
- # uv run twine upload dist/*
102
-
103
- # # Output installation instructions
104
- # $null = (Get-Content pyproject.toml -Raw) -match '(?m)^\[(project|tool\.poetry)\][^\[]*?version\s*=\s*"([^"]*)"'
105
- # $VERSION = $Matches[2]
106
- # $FEED_URL = "${{ secrets.AZURE_ARTIFACTS_URL }}" -replace "/upload", "/simple"
107
-
108
- # $message = @"
109
- # Example usage in pyproject.toml:
110
- # [project]
111
- # dependencies = [
112
- # "uipath==$VERSION"
113
- # ]
114
- # "@
115
-
116
- # Write-Host $message