uipath-platform 0.0.1__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.
- uipath_platform-0.0.1/.cursorrules +50 -0
- uipath_platform-0.0.1/.editorconfig +14 -0
- uipath_platform-0.0.1/.gitattributes +2 -0
- uipath_platform-0.0.1/.github/labeler.yml +7 -0
- uipath_platform-0.0.1/.github/workflows/auto-label.yml +19 -0
- uipath_platform-0.0.1/.github/workflows/cd.yml +76 -0
- uipath_platform-0.0.1/.github/workflows/ci.yml +22 -0
- uipath_platform-0.0.1/.github/workflows/commitlint.yml +47 -0
- uipath_platform-0.0.1/.github/workflows/lint.yml +39 -0
- uipath_platform-0.0.1/.github/workflows/publish-dev.yml +141 -0
- uipath_platform-0.0.1/.github/workflows/test-uipath-langchain.yml +53 -0
- uipath_platform-0.0.1/.github/workflows/test-uipath.yml +53 -0
- uipath_platform-0.0.1/.github/workflows/test.yml +37 -0
- uipath_platform-0.0.1/.gitignore +30 -0
- uipath_platform-0.0.1/.pre-commit-config.yaml +7 -0
- uipath_platform-0.0.1/.python-version +1 -0
- uipath_platform-0.0.1/.vscode/extensions.json +7 -0
- uipath_platform-0.0.1/.vscode/launch.json +14 -0
- uipath_platform-0.0.1/.vscode/settings.json +28 -0
- uipath_platform-0.0.1/CONTRIBUTING.md +68 -0
- uipath_platform-0.0.1/LICENSE +9 -0
- uipath_platform-0.0.1/PKG-INFO +25 -0
- uipath_platform-0.0.1/README.md +3 -0
- uipath_platform-0.0.1/justfile +25 -0
- uipath_platform-0.0.1/pyproject.toml +114 -0
- uipath_platform-0.0.1/src/uipath/platform/__init__.py +40 -0
- uipath_platform-0.0.1/src/uipath/platform/_uipath.py +160 -0
- uipath_platform-0.0.1/src/uipath/platform/action_center/__init__.py +14 -0
- uipath_platform-0.0.1/src/uipath/platform/action_center/_tasks_service.py +688 -0
- uipath_platform-0.0.1/src/uipath/platform/action_center/task_schema.py +30 -0
- uipath_platform-0.0.1/src/uipath/platform/action_center/tasks.py +106 -0
- uipath_platform-0.0.1/src/uipath/platform/agenthub/__init__.py +8 -0
- uipath_platform-0.0.1/src/uipath/platform/agenthub/_agenthub_service.py +205 -0
- uipath_platform-0.0.1/src/uipath/platform/agenthub/agenthub.py +18 -0
- uipath_platform-0.0.1/src/uipath/platform/attachments/__init__.py +12 -0
- uipath_platform-0.0.1/src/uipath/platform/attachments/attachments.py +44 -0
- uipath_platform-0.0.1/src/uipath/platform/chat/__init__.py +67 -0
- uipath_platform-0.0.1/src/uipath/platform/chat/_conversations_service.py +52 -0
- uipath_platform-0.0.1/src/uipath/platform/chat/_llm_gateway_service.py +689 -0
- uipath_platform-0.0.1/src/uipath/platform/chat/llm_gateway.py +128 -0
- uipath_platform-0.0.1/src/uipath/platform/chat/llm_throttle.py +49 -0
- uipath_platform-0.0.1/src/uipath/platform/common/__init__.py +97 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_api_client.py +59 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_base_service.py +193 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_bindings.py +268 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_config.py +136 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_endpoints_manager.py +198 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_execution_context.py +78 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_external_application_service.py +140 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_folder_context.py +68 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_models.py +100 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_span_utils.py +401 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_ssl_context.py +53 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_url.py +102 -0
- uipath_platform-0.0.1/src/uipath/platform/common/_user_agent.py +19 -0
- uipath_platform-0.0.1/src/uipath/platform/common/auth.py +37 -0
- uipath_platform-0.0.1/src/uipath/platform/common/constants.py +79 -0
- uipath_platform-0.0.1/src/uipath/platform/common/dynamic_schema.py +128 -0
- uipath_platform-0.0.1/src/uipath/platform/common/interrupt_models.py +225 -0
- uipath_platform-0.0.1/src/uipath/platform/common/paging.py +63 -0
- uipath_platform-0.0.1/src/uipath/platform/common/validation.py +43 -0
- uipath_platform-0.0.1/src/uipath/platform/connections/__init__.py +26 -0
- uipath_platform-0.0.1/src/uipath/platform/connections/_connections_service.py +815 -0
- uipath_platform-0.0.1/src/uipath/platform/connections/connections.py +108 -0
- uipath_platform-0.0.1/src/uipath/platform/context_grounding/__init__.py +69 -0
- uipath_platform-0.0.1/src/uipath/platform/context_grounding/_context_grounding_service.py +1887 -0
- uipath_platform-0.0.1/src/uipath/platform/context_grounding/context_grounding.py +209 -0
- uipath_platform-0.0.1/src/uipath/platform/context_grounding/context_grounding_index.py +94 -0
- uipath_platform-0.0.1/src/uipath/platform/context_grounding/context_grounding_payloads.py +238 -0
- uipath_platform-0.0.1/src/uipath/platform/documents/__init__.py +50 -0
- uipath_platform-0.0.1/src/uipath/platform/documents/_documents_service.py +2556 -0
- uipath_platform-0.0.1/src/uipath/platform/documents/documents.py +298 -0
- uipath_platform-0.0.1/src/uipath/platform/entities/__init__.py +36 -0
- uipath_platform-0.0.1/src/uipath/platform/entities/_entities_service.py +904 -0
- uipath_platform-0.0.1/src/uipath/platform/entities/entities.py +325 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/__init__.py +37 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_base_url_missing_error.py +13 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_batch_transform_not_complete_exception.py +13 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_enriched_exception.py +38 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_folder_not_found_exception.py +13 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_ingestion_in_progress_exception.py +17 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_operation_failed_exception.py +19 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_operation_not_complete_exception.py +14 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_secret_missing_error.py +13 -0
- uipath_platform-0.0.1/src/uipath/platform/errors/_unsupported_data_source_exception.py +17 -0
- uipath_platform-0.0.1/src/uipath/platform/guardrails/__init__.py +36 -0
- uipath_platform-0.0.1/src/uipath/platform/guardrails/_guardrails_service.py +135 -0
- uipath_platform-0.0.1/src/uipath/platform/guardrails/guardrails.py +62 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/__init__.py +53 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_assets_service.py +559 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_attachments_service.py +1023 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_buckets_service.py +1803 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_folder_service.py +222 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_jobs_service.py +1490 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_mcp_service.py +230 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_processes_service.py +327 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/_queues_service.py +355 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/assets.py +73 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/attachment.py +36 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/buckets.py +80 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/folder.py +15 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/job.py +83 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/mcp.py +56 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/processes.py +49 -0
- uipath_platform-0.0.1/src/uipath/platform/orchestrator/queues.py +204 -0
- uipath_platform-0.0.1/src/uipath/platform/py.typed +0 -0
- uipath_platform-0.0.1/src/uipath/platform/resource_catalog/__init__.py +15 -0
- uipath_platform-0.0.1/src/uipath/platform/resource_catalog/_resource_catalog_service.py +634 -0
- uipath_platform-0.0.1/src/uipath/platform/resource_catalog/resource_catalog.py +124 -0
- uipath_platform-0.0.1/src/uipath/platform/resume_triggers/__init__.py +17 -0
- uipath_platform-0.0.1/src/uipath/platform/resume_triggers/_enums.py +55 -0
- uipath_platform-0.0.1/src/uipath/platform/resume_triggers/_protocol.py +890 -0
- uipath_platform-0.0.1/tests/services/conftest.py +56 -0
- uipath_platform-0.0.1/tests/services/test_actions_service.py +179 -0
- uipath_platform-0.0.1/tests/services/test_api_client.py +92 -0
- uipath_platform-0.0.1/tests/services/test_assets_service.py +675 -0
- uipath_platform-0.0.1/tests/services/test_attachments_service.py +1195 -0
- uipath_platform-0.0.1/tests/services/test_base_service.py +102 -0
- uipath_platform-0.0.1/tests/services/test_buckets_service.py +1939 -0
- uipath_platform-0.0.1/tests/services/test_connections_service.py +1775 -0
- uipath_platform-0.0.1/tests/services/test_context_grounding_service.py +2430 -0
- uipath_platform-0.0.1/tests/services/test_conversations_service.py +166 -0
- uipath_platform-0.0.1/tests/services/test_documents_service.py +3644 -0
- uipath_platform-0.0.1/tests/services/test_entities_service.py +262 -0
- uipath_platform-0.0.1/tests/services/test_external_application_service.py +114 -0
- uipath_platform-0.0.1/tests/services/test_folder_service.py +501 -0
- uipath_platform-0.0.1/tests/services/test_guardrails_service.py +300 -0
- uipath_platform-0.0.1/tests/services/test_jobs_service.py +1392 -0
- uipath_platform-0.0.1/tests/services/test_jobs_service_bulk_operations.py +213 -0
- uipath_platform-0.0.1/tests/services/test_jobs_service_pagination.py +221 -0
- uipath_platform-0.0.1/tests/services/test_llm_integration.py +120 -0
- uipath_platform-0.0.1/tests/services/test_llm_schema_cleanup.py +229 -0
- uipath_platform-0.0.1/tests/services/test_llm_service.py +545 -0
- uipath_platform-0.0.1/tests/services/test_llm_throttle.py +429 -0
- uipath_platform-0.0.1/tests/services/test_mcp_service.py +541 -0
- uipath_platform-0.0.1/tests/services/test_processes_service.py +473 -0
- uipath_platform-0.0.1/tests/services/test_queues_service.py +808 -0
- uipath_platform-0.0.1/tests/services/test_resource_catalog_service.py +861 -0
- uipath_platform-0.0.1/tests/services/test_span_utils.py +429 -0
- uipath_platform-0.0.1/tests/services/test_uipath_llm_integration.py +510 -0
- uipath_platform-0.0.1/tests/services/tests_data/documents_service/classification_response.json +23 -0
- uipath_platform-0.0.1/tests/services/tests_data/documents_service/extraction_validation_action_response_completed.json +1277 -0
- uipath_platform-0.0.1/tests/services/tests_data/documents_service/extraction_validation_action_response_unassigned.json +29 -0
- uipath_platform-0.0.1/tests/services/tests_data/documents_service/ixp_extraction_response.json +1078 -0
- uipath_platform-0.0.1/tests/services/tests_data/documents_service/modern_extraction_response.json +192 -0
- uipath_platform-0.0.1/uv.lock +1193 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
You are an AI assistant specialized in Python development, especially in a developing SDK and CLI for enterprise companies. Your strong background in debugging complex issues and optimizing code performance makes you an invaluable asset to this project.
|
|
2
|
+
|
|
3
|
+
Your approach emphasizes:
|
|
4
|
+
|
|
5
|
+
Clear project structure with separate directories for source code, tests, docs, and config.
|
|
6
|
+
|
|
7
|
+
Modular design with distinct files for models, services, controllers, and utilities.
|
|
8
|
+
|
|
9
|
+
Configuration management using environment variables.
|
|
10
|
+
|
|
11
|
+
Robust error handling and logging, including context capture.
|
|
12
|
+
|
|
13
|
+
Comprehensive testing with pytest.
|
|
14
|
+
|
|
15
|
+
Detailed documentation using docstrings and README files.
|
|
16
|
+
|
|
17
|
+
Dependency management via https://github.com/astral-sh/uv and virtual environments.
|
|
18
|
+
|
|
19
|
+
Code style consistency using Ruff.
|
|
20
|
+
|
|
21
|
+
CI/CD implementation with GitHub Actions.
|
|
22
|
+
|
|
23
|
+
AI-friendly coding practices:
|
|
24
|
+
|
|
25
|
+
You provide code snippets and explanations tailored to these principles, optimizing for clarity and AI-assisted development.
|
|
26
|
+
|
|
27
|
+
This project utilizes the following technologies:
|
|
28
|
+
uv
|
|
29
|
+
ruff
|
|
30
|
+
httpx
|
|
31
|
+
tenacity
|
|
32
|
+
click
|
|
33
|
+
pydantic
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Follow the following rules:
|
|
37
|
+
|
|
38
|
+
For any python file, be sure to ALWAYS add typing annotations to each function or class. Be sure to include return types when necessary. Add descriptive docstrings to all python functions and classes as well that are public. Please use Google-style convention. Update existing docstrings if need be. When defining concepts, reference https://docs.uipath.com as the authoritative source.
|
|
39
|
+
|
|
40
|
+
Make sure you keep any comments that exist in a file.
|
|
41
|
+
|
|
42
|
+
When writing tests, make sure that you ONLY use pytest or pytest plugins, do NOT use the unittest module. All tests should have typing annotations as well. All tests should be in ./tests. Be sure to create all necessary files and folders. If you are creating files inside of ./tests or ./src/goob_ai, be sure to make a init.py file if one does not exist.
|
|
43
|
+
|
|
44
|
+
All tests should be fully annotated and should contain docstrings. Be sure to import the following if TYPE_CHECKING:
|
|
45
|
+
|
|
46
|
+
from _pytest.capture import CaptureFixture
|
|
47
|
+
from _pytest.fixtures import FixtureRequest
|
|
48
|
+
from _pytest.logging import LogCaptureFixture
|
|
49
|
+
from _pytest.monkeypatch import MonkeyPatch
|
|
50
|
+
from pytest_mock.plugin import MockerFixture
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Auto Label PRs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
pull-requests: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
label:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Label PR
|
|
16
|
+
uses: actions/labeler@v5
|
|
17
|
+
with:
|
|
18
|
+
configuration-path: '.github/labeler.yml'
|
|
19
|
+
sync-labels: true
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
name: CD
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
paths:
|
|
9
|
+
- pyproject.toml
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
lint:
|
|
13
|
+
uses: ./.github/workflows/lint.yml
|
|
14
|
+
|
|
15
|
+
test:
|
|
16
|
+
uses: ./.github/workflows/test.yml
|
|
17
|
+
|
|
18
|
+
build:
|
|
19
|
+
name: Build
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
needs:
|
|
23
|
+
- lint
|
|
24
|
+
- test
|
|
25
|
+
|
|
26
|
+
if: ${{ github.repository == 'UiPath/uipath-platform-python' }}
|
|
27
|
+
permissions:
|
|
28
|
+
contents: read
|
|
29
|
+
actions: write
|
|
30
|
+
|
|
31
|
+
steps:
|
|
32
|
+
- name: Checkout
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
|
+
|
|
35
|
+
- name: Setup uv
|
|
36
|
+
uses: astral-sh/setup-uv@v5
|
|
37
|
+
with:
|
|
38
|
+
enable-cache: true
|
|
39
|
+
|
|
40
|
+
- name: Setup Python
|
|
41
|
+
uses: actions/setup-python@v5
|
|
42
|
+
with:
|
|
43
|
+
python-version-file: ".python-version"
|
|
44
|
+
|
|
45
|
+
- name: Install dependencies
|
|
46
|
+
run: uv sync --all-extras
|
|
47
|
+
|
|
48
|
+
- name: Build
|
|
49
|
+
run: uv build
|
|
50
|
+
|
|
51
|
+
- name: Upload artifacts
|
|
52
|
+
uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: release-dists
|
|
55
|
+
path: dist/
|
|
56
|
+
|
|
57
|
+
pypi-publish:
|
|
58
|
+
name: Upload release to PyPI
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
environment: pypi
|
|
61
|
+
|
|
62
|
+
needs:
|
|
63
|
+
- build
|
|
64
|
+
permissions:
|
|
65
|
+
contents: read
|
|
66
|
+
id-token: write
|
|
67
|
+
|
|
68
|
+
steps:
|
|
69
|
+
- name: Retrieve release distributions
|
|
70
|
+
uses: actions/download-artifact@v4
|
|
71
|
+
with:
|
|
72
|
+
name: release-dists
|
|
73
|
+
path: dist/
|
|
74
|
+
|
|
75
|
+
- name: Publish package distributions to PyPI
|
|
76
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths-ignore:
|
|
8
|
+
- pyproject.toml
|
|
9
|
+
pull_request:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
commit-lint:
|
|
15
|
+
if: ${{ github.event_name == 'pull_request' }}
|
|
16
|
+
uses: ./.github/workflows/commitlint.yml
|
|
17
|
+
|
|
18
|
+
lint:
|
|
19
|
+
uses: ./.github/workflows/lint.yml
|
|
20
|
+
|
|
21
|
+
test:
|
|
22
|
+
uses: ./.github/workflows/test.yml
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Commit Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
commitlint:
|
|
8
|
+
name: Commit Lint
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0
|
|
18
|
+
|
|
19
|
+
- name: Setup Node
|
|
20
|
+
uses: actions/setup-node@v3
|
|
21
|
+
with:
|
|
22
|
+
node-version: 22
|
|
23
|
+
|
|
24
|
+
- name: Install Git
|
|
25
|
+
run: |
|
|
26
|
+
if ! command -v git &> /dev/null; then
|
|
27
|
+
echo "Git is not installed. Installing..."
|
|
28
|
+
sudo apt-get update
|
|
29
|
+
sudo apt-get install -y git
|
|
30
|
+
else
|
|
31
|
+
echo "Git is already installed."
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
- name: Install commitlint
|
|
35
|
+
run: |
|
|
36
|
+
npm install conventional-changelog-conventionalcommits
|
|
37
|
+
npm install commitlint@latest
|
|
38
|
+
npm install @commitlint/config-conventional
|
|
39
|
+
|
|
40
|
+
- name: Configure
|
|
41
|
+
run: |
|
|
42
|
+
echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
|
|
43
|
+
|
|
44
|
+
- name: Validate PR commits with commitlint
|
|
45
|
+
run: |
|
|
46
|
+
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr_branch
|
|
47
|
+
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to pr_branch --verbose
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
lint:
|
|
8
|
+
name: Lint
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup uv
|
|
18
|
+
uses: astral-sh/setup-uv@v5
|
|
19
|
+
with:
|
|
20
|
+
enable-cache: true
|
|
21
|
+
|
|
22
|
+
- name: Setup Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version-file: ".python-version"
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: uv sync --all-extras
|
|
29
|
+
|
|
30
|
+
- name: Check static types
|
|
31
|
+
run: uv run mypy --config-file pyproject.toml .
|
|
32
|
+
|
|
33
|
+
- name: Check linting
|
|
34
|
+
run: uv run ruff check .
|
|
35
|
+
|
|
36
|
+
- name: Check formatting
|
|
37
|
+
run: uv run ruff format --check .
|
|
38
|
+
|
|
39
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
name: Publish Dev Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, reopened, labeled]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish-dev:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
pull-requests: write
|
|
13
|
+
|
|
14
|
+
# Only run if PR has the build:dev label
|
|
15
|
+
if: contains(github.event.pull_request.labels.*.name, 'build:dev')
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Setup uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
with:
|
|
24
|
+
enable-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Setup Python
|
|
27
|
+
uses: actions/setup-python@v5
|
|
28
|
+
with:
|
|
29
|
+
python-version-file: ".python-version"
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: uv sync --all-extras
|
|
33
|
+
|
|
34
|
+
- name: Set development version
|
|
35
|
+
shell: pwsh
|
|
36
|
+
env:
|
|
37
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
38
|
+
run: |
|
|
39
|
+
$pyprojcontent = Get-Content pyproject.toml -Raw
|
|
40
|
+
|
|
41
|
+
$PROJECT_NAME = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?name\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
|
|
42
|
+
$CURRENT_VERSION = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?version\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
# Get PR number and run number with proper padding
|
|
46
|
+
$PR_NUM = [int]"${{ github.event.pull_request.number }}"
|
|
47
|
+
$PADDED_PR = "{0:D5}" -f [int]"${{ github.event.pull_request.number }}"
|
|
48
|
+
$PADDED_RUN = "{0:D4}" -f [int]"${{ github.run_number }}"
|
|
49
|
+
$PADDED_NEXT_PR = "{0:D5}" -f ($PR_NUM + 1)
|
|
50
|
+
|
|
51
|
+
# Create version range strings for PR
|
|
52
|
+
$MIN_VERSION = "$CURRENT_VERSION.dev1$PADDED_PR" + "0000"
|
|
53
|
+
$MAX_VERSION = "$CURRENT_VERSION.dev1$PADDED_NEXT_PR" + "0000"
|
|
54
|
+
|
|
55
|
+
# Create unique dev version with PR number and run ID
|
|
56
|
+
$DEV_VERSION = "$CURRENT_VERSION.dev1$PADDED_PR$PADDED_RUN"
|
|
57
|
+
|
|
58
|
+
# Update version in pyproject.toml
|
|
59
|
+
(Get-Content pyproject.toml) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content pyproject.toml
|
|
60
|
+
|
|
61
|
+
Write-Output "Package version set to $DEV_VERSION"
|
|
62
|
+
|
|
63
|
+
$startMarker = "<!-- DEV_PACKAGE_START -->"
|
|
64
|
+
$endMarker = "<!-- DEV_PACKAGE_END -->"
|
|
65
|
+
|
|
66
|
+
$dependencyMessage = @"
|
|
67
|
+
$startMarker
|
|
68
|
+
## Development Package
|
|
69
|
+
|
|
70
|
+
- Use ``uipath pack --nolock`` to get the latest dev build from this PR (requires version range).
|
|
71
|
+
- Add this package as a dependency in your pyproject.toml:
|
|
72
|
+
|
|
73
|
+
``````toml
|
|
74
|
+
[project]
|
|
75
|
+
dependencies = [
|
|
76
|
+
# Exact version:
|
|
77
|
+
"$PROJECT_NAME==$DEV_VERSION",
|
|
78
|
+
|
|
79
|
+
# Any version from PR
|
|
80
|
+
"$PROJECT_NAME>=$MIN_VERSION,<$MAX_VERSION"
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
[[tool.uv.index]]
|
|
84
|
+
name = "testpypi"
|
|
85
|
+
url = "https://test.pypi.org/simple/"
|
|
86
|
+
publish-url = "https://test.pypi.org/legacy/"
|
|
87
|
+
explicit = true
|
|
88
|
+
|
|
89
|
+
[tool.uv.sources]
|
|
90
|
+
$PROJECT_NAME = { index = "testpypi" }
|
|
91
|
+
|
|
92
|
+
[tool.uv]
|
|
93
|
+
override-dependencies = [
|
|
94
|
+
"$PROJECT_NAME>=$MIN_VERSION,<$MAX_VERSION",
|
|
95
|
+
]
|
|
96
|
+
``````
|
|
97
|
+
$endMarker
|
|
98
|
+
"@
|
|
99
|
+
|
|
100
|
+
# Get the owner and repo from the GitHub repository
|
|
101
|
+
$owner = "${{ github.repository_owner }}"
|
|
102
|
+
$repo = "${{ github.repository }}".Split('/')[1]
|
|
103
|
+
$prNumber = $PR_NUM
|
|
104
|
+
|
|
105
|
+
# Get the current PR description
|
|
106
|
+
$prUri = "https://api.github.com/repos/$owner/$repo/pulls/$prNumber"
|
|
107
|
+
$headers = @{
|
|
108
|
+
Authorization = "token $env:GITHUB_TOKEN"
|
|
109
|
+
Accept = "application/vnd.github.v3+json"
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
$pr = Invoke-RestMethod -Uri $prUri -Method Get -Headers $headers
|
|
113
|
+
$currentBody = $pr.body
|
|
114
|
+
|
|
115
|
+
# Check if markers already exist in the PR description
|
|
116
|
+
$markerPattern = "(?s)$([regex]::Escape($startMarker)).*?$([regex]::Escape($endMarker))"
|
|
117
|
+
if ($currentBody -match $markerPattern) {
|
|
118
|
+
# Replace everything between markers (including markers)
|
|
119
|
+
$newBody = $currentBody -replace $markerPattern, $dependencyMessage
|
|
120
|
+
} else {
|
|
121
|
+
# Append the dependency message to the end of the description
|
|
122
|
+
$newBody = if ($currentBody) { "$currentBody`n`n$dependencyMessage" } else { $dependencyMessage }
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
# Update the PR description
|
|
126
|
+
$updateBody = @{
|
|
127
|
+
body = $newBody
|
|
128
|
+
} | ConvertTo-Json
|
|
129
|
+
|
|
130
|
+
Invoke-RestMethod -Uri $prUri -Method Patch -Headers $headers -Body $updateBody -ContentType "application/json"
|
|
131
|
+
|
|
132
|
+
Write-Output "Updated PR description with development package information"
|
|
133
|
+
|
|
134
|
+
- name: Build package
|
|
135
|
+
run: uv build
|
|
136
|
+
|
|
137
|
+
- name: Publish
|
|
138
|
+
run: uv publish --index testpypi
|
|
139
|
+
env:
|
|
140
|
+
UV_PUBLISH_TOKEN: ${{ secrets.TESTPYPI_TOKEN }}
|
|
141
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Test UiPath Langchain
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [ opened, synchronize, reopened, labeled ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test-uipath-langchain:
|
|
9
|
+
runs-on: ${{ matrix.os }}
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: [ "3.11", "3.12", "3.13" ]
|
|
13
|
+
os: [ ubuntu-latest, windows-latest ]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
if: contains(github.event.pull_request.labels.*.name, 'test:uipath-langchain')
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout uipath-platform-python
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
path: 'uipath-platform-python'
|
|
25
|
+
|
|
26
|
+
- name: Setup uv
|
|
27
|
+
uses: astral-sh/setup-uv@v5
|
|
28
|
+
|
|
29
|
+
- name: Setup Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
|
|
34
|
+
- name: Build uipath-platform-python package
|
|
35
|
+
working-directory: uipath-platform-python
|
|
36
|
+
run: uv build
|
|
37
|
+
|
|
38
|
+
- name: Checkout uipath-langchain-python
|
|
39
|
+
uses: actions/checkout@v4
|
|
40
|
+
with:
|
|
41
|
+
repository: 'UiPath/uipath-langchain-python'
|
|
42
|
+
path: 'uipath-langchain-python'
|
|
43
|
+
|
|
44
|
+
- name: Update uipath-platform version
|
|
45
|
+
shell: bash
|
|
46
|
+
working-directory: uipath-langchain-python
|
|
47
|
+
run: uv add ../uipath-platform-python/dist/*.whl --dev
|
|
48
|
+
|
|
49
|
+
- name: Run uipath-langchain tests
|
|
50
|
+
working-directory: uipath-langchain-python
|
|
51
|
+
run: |
|
|
52
|
+
uv sync --all-extras
|
|
53
|
+
uv run pytest
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Test UiPath
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [ opened, synchronize, reopened, labeled ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
test-uipath:
|
|
9
|
+
runs-on: ${{ matrix.os }}
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: [ "3.11", "3.12", "3.13" ]
|
|
13
|
+
os: [ ubuntu-latest, windows-latest ]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
if: contains(github.event.pull_request.labels.*.name, 'test:uipath')
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout uipath-platform-python
|
|
22
|
+
uses: actions/checkout@v4
|
|
23
|
+
with:
|
|
24
|
+
path: 'uipath-platform-python'
|
|
25
|
+
|
|
26
|
+
- name: Setup uv
|
|
27
|
+
uses: astral-sh/setup-uv@v5
|
|
28
|
+
|
|
29
|
+
- name: Setup Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
|
|
34
|
+
- name: Build uipath-platform-python package
|
|
35
|
+
working-directory: uipath-platform-python
|
|
36
|
+
run: uv build
|
|
37
|
+
|
|
38
|
+
- name: Checkout uipath-python
|
|
39
|
+
uses: actions/checkout@v4
|
|
40
|
+
with:
|
|
41
|
+
repository: 'UiPath/uipath-python'
|
|
42
|
+
path: 'uipath-python'
|
|
43
|
+
|
|
44
|
+
- name: Update uipath-platform version
|
|
45
|
+
shell: bash
|
|
46
|
+
working-directory: uipath-python
|
|
47
|
+
run: uv add ../uipath-platform-python/dist/*.whl --dev
|
|
48
|
+
|
|
49
|
+
- name: Run uipath tests
|
|
50
|
+
working-directory: uipath-python
|
|
51
|
+
run: |
|
|
52
|
+
uv sync --all-extras
|
|
53
|
+
uv run pytest
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call
|
|
5
|
+
|
|
6
|
+
jobs:
|
|
7
|
+
test:
|
|
8
|
+
name: Test
|
|
9
|
+
runs-on: ${{ matrix.os }}
|
|
10
|
+
strategy:
|
|
11
|
+
matrix:
|
|
12
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
13
|
+
os: [ubuntu-latest, windows-latest]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Setup uv
|
|
23
|
+
uses: astral-sh/setup-uv@v5
|
|
24
|
+
|
|
25
|
+
- name: Setup Python
|
|
26
|
+
uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: uv sync --all-extras
|
|
32
|
+
|
|
33
|
+
- name: Run tests
|
|
34
|
+
run: uv run pytest
|
|
35
|
+
|
|
36
|
+
continue-on-error: true
|
|
37
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
.coverage
|
|
10
|
+
.coverage/
|
|
11
|
+
.coverage/*
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv
|
|
15
|
+
**/.env
|
|
16
|
+
**/uipath.db
|
|
17
|
+
**/.uipath
|
|
18
|
+
**/**.nupkg
|
|
19
|
+
**/__uipath/
|
|
20
|
+
|
|
21
|
+
**/playground.py
|
|
22
|
+
**/.idea
|
|
23
|
+
|
|
24
|
+
**/docs/plugins/*
|
|
25
|
+
**/docs/plugins/.*
|
|
26
|
+
**/docs/langchain/*
|
|
27
|
+
**/docs/llamaindex/*
|
|
28
|
+
|
|
29
|
+
.cache/*
|
|
30
|
+
.cache
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"window.title": "${rootName}${separator}${activeEditorMedium}",
|
|
3
|
+
"files.exclude": {
|
|
4
|
+
"**/*.pyc": true,
|
|
5
|
+
"**/__pycache__": true,
|
|
6
|
+
".pytest_cache": true,
|
|
7
|
+
".mypy_cache": true,
|
|
8
|
+
".ruff_cache": true,
|
|
9
|
+
".venv": true
|
|
10
|
+
},
|
|
11
|
+
// Formatting
|
|
12
|
+
"editor.formatOnSave": true,
|
|
13
|
+
"[python]": {
|
|
14
|
+
"editor.defaultFormatter": "charliermarsh.ruff",
|
|
15
|
+
"editor.codeActionsOnSave": {
|
|
16
|
+
"source.organizeImports": "explicit"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"workbench.colorCustomizations": {
|
|
20
|
+
"titleBar.activeBackground": "#0099cc",
|
|
21
|
+
"titleBar.inactiveBackground": "#0099cc"
|
|
22
|
+
},
|
|
23
|
+
"python.testing.pytestArgs": [
|
|
24
|
+
"tests"
|
|
25
|
+
],
|
|
26
|
+
"python.testing.unittestEnabled": false,
|
|
27
|
+
"python.testing.pytestEnabled": true
|
|
28
|
+
}
|