Skip to content

Commit 21f46e6

Browse files
committed
feat: uipath-python-integrations
1 parent 998e57f commit 21f46e6

266 files changed

Lines changed: 371 additions & 79 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
paths-ignore:
8-
- pyproject.toml
8+
- packages/*/pyproject.toml
99
pull_request:
1010
branches:
1111
- main
@@ -19,4 +19,4 @@ jobs:
1919
uses: ./.github/workflows/lint.yml
2020

2121
test:
22-
uses: ./.github/workflows/test.yml
22+
uses: ./.github/workflows/test.yml

.github/workflows/integration_tests.yml

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,29 @@ jobs:
2323
- name: Discover testcases
2424
id: discover
2525
run: |
26-
# Find all testcase folders (excluding common folders like README, etc.)
27-
testcase_dirs=$(find testcases -maxdepth 1 -type d -name "*-*" | sed 's|testcases/||' | sort)
26+
# Find all packages with testcases directories
27+
testcases_array="[]"
2828
29-
echo "Found testcase directories:"
30-
echo "$testcase_dirs"
29+
for package_dir in packages/*/testcases; do
30+
if [ -d "$package_dir" ]; then
31+
package_name=$(echo "$package_dir" | sed 's|packages/\(.*\)/testcases|\1|')
32+
echo "Discovering testcases in $package_name"
3133
32-
# Convert to JSON array for matrix
33-
testcases_json=$(echo "$testcase_dirs" | jq -R -s -c 'split("\n")[:-1]')
34-
echo "testcases=$testcases_json" >> $GITHUB_OUTPUT
34+
# Find all testcase folders in this package
35+
for testcase_dir in "$package_dir"/*-*; do
36+
if [ -d "$testcase_dir" ]; then
37+
testcase_name=$(basename "$testcase_dir")
38+
echo " Found: $testcase_name"
39+
40+
# Add to JSON array with package and testcase info
41+
testcases_array=$(echo "$testcases_array" | jq -c ". += [{\"package\": \"$package_name\", \"testcase\": \"$testcase_name\"}]")
42+
fi
43+
done
44+
fi
45+
done
46+
47+
echo "Testcases matrix: $testcases_array"
48+
echo "testcases=$testcases_array" >> $GITHUB_OUTPUT
3549
3650
integration-tests:
3751
needs: [discover-testcases]
@@ -41,13 +55,16 @@ jobs:
4155
image: ghcr.io/astral-sh/uv:python3.12-bookworm
4256
env:
4357
UIPATH_JOB_KEY: "3a03d5cb-fa21-4021-894d-a8e2eda0afe0"
58+
defaults:
59+
run:
60+
working-directory: packages/${{ matrix.testcase-info.package }}
4461
strategy:
4562
fail-fast: false
4663
matrix:
47-
testcase: ${{ fromJson(needs.discover-testcases.outputs.testcases) }}
64+
testcase-info: ${{ fromJson(needs.discover-testcases.outputs.testcases) }}
4865
environment: [alpha, cloud, staging]
4966

50-
name: "${{ matrix.testcase }} / ${{ matrix.environment }}"
67+
name: "${{ matrix.testcase-info.package }}/${{ matrix.testcase-info.testcase }} / ${{ matrix.environment }}"
5168

5269
steps:
5370
- name: Checkout code
@@ -61,9 +78,10 @@ jobs:
6178
CLIENT_ID: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_ID || matrix.environment == 'staging' && secrets.STAGING_TEST_CLIENT_ID || matrix.environment == 'cloud' && secrets.CLOUD_TEST_CLIENT_ID }}
6279
CLIENT_SECRET: ${{ matrix.environment == 'alpha' && secrets.ALPHA_TEST_CLIENT_SECRET || matrix.environment == 'staging' && secrets.STAGING_TEST_CLIENT_SECRET || matrix.environment == 'cloud' && secrets.CLOUD_TEST_CLIENT_SECRET }}
6380
BASE_URL: ${{ matrix.environment == 'alpha' && secrets.ALPHA_BASE_URL || matrix.environment == 'staging' && secrets.STAGING_BASE_URL || matrix.environment == 'cloud' && secrets.CLOUD_BASE_URL }}
64-
working-directory: testcases/${{ matrix.testcase }}
81+
working-directory: packages/${{ matrix.testcase-info.package }}/testcases/${{ matrix.testcase-info.testcase }}
6582
run: |
66-
echo "Running testcase: ${{ matrix.testcase }}"
83+
echo "Running testcase: ${{ matrix.testcase-info.testcase }}"
84+
echo "Package: ${{ matrix.testcase-info.package }}"
6785
echo "Environment: ${{ matrix.environment }}"
6886
echo "Working directory: $(pwd)"
6987

.github/workflows/lint.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,31 @@ on:
44
workflow_call
55

66
jobs:
7+
discover-packages:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
packages: ${{ steps.discover.outputs.packages }}
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Discover packages
16+
id: discover
17+
run: |
18+
# Find all packages with pyproject.toml
19+
packages_array="[]"
20+
21+
for package_dir in packages/*/pyproject.toml; do
22+
if [ -f "$package_dir" ]; then
23+
package_name=$(echo "$package_dir" | sed 's|packages/\(.*\)/pyproject.toml|\1|')
24+
echo "Found package: $package_name"
25+
packages_array=$(echo "$packages_array" | jq -c ". += [\"$package_name\"]")
26+
fi
27+
done
28+
29+
echo "Packages: $packages_array"
30+
echo "packages=$packages_array" >> $GITHUB_OUTPUT
31+
732
skip-lint:
833
name: Skip Lint (Custom Version Testing)
934
runs-on: ubuntu-latest
@@ -17,9 +42,16 @@ jobs:
1742
echo "This job completes successfully to allow PR merging"
1843
1944
lint:
20-
name: Lint
45+
name: Lint ${{ matrix.package }}
46+
needs: [discover-packages]
2147
runs-on: ubuntu-latest
2248
if: "!contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')"
49+
defaults:
50+
run:
51+
working-directory: packages/${{ matrix.package }}
52+
strategy:
53+
matrix:
54+
package: ${{ fromJson(needs.discover-packages.outputs.packages) }}
2355
permissions:
2456
contents: read
2557

.github/workflows/publish-dev.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
jobs:
88
publish-dev:
99
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
working-directory: ${{ matrix.package.path }}
13+
strategy:
14+
matrix:
15+
package:
16+
- name: uipath-llamaindex
17+
path: packages/uipath-llamaindex
1018
permissions:
1119
contents: read
1220
pull-requests: write
@@ -36,7 +44,8 @@ jobs:
3644
env:
3745
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3846
run: |
39-
$pyprojcontent = Get-Content pyproject.toml -Raw
47+
$pyprojPath = "${{ matrix.package.path }}/pyproject.toml"
48+
$pyprojcontent = Get-Content $pyprojPath -Raw
4049
4150
$PROJECT_NAME = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?name\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
4251
$CURRENT_VERSION = ($pyprojcontent | Select-String -Pattern '(?m)^\[(project|tool\.poetry)\][^\[]*?version\s*=\s*"([^"]*)"' -AllMatches).Matches[0].Groups[2].Value
@@ -55,9 +64,9 @@ jobs:
5564
$DEV_VERSION = "$CURRENT_VERSION.dev1$PADDED_PR$PADDED_RUN"
5665
5766
# Update version in pyproject.toml
58-
(Get-Content pyproject.toml) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content pyproject.toml
67+
(Get-Content $pyprojPath) -replace "version = `"$CURRENT_VERSION`"", "version = `"$DEV_VERSION`"" | Set-Content $pyprojPath
5968
60-
Write-Output "Package version set to $DEV_VERSION"
69+
Write-Output "Package $PROJECT_NAME version set to $DEV_VERSION"
6170
6271
$dependencyMessage = @"
6372
## Development Package

.github/workflows/publish-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ on:
55
branches:
66
- main
77
paths:
8-
- "docs/**"
9-
- "pyproject.toml"
8+
- "packages/*/docs/**"
9+
- "packages/*/pyproject.toml"
1010

1111
jobs:
1212
publish-docs:
1313
runs-on: ubuntu-latest
14-
if: ${{ github.repository == 'UiPath/uipath-llamaindex-python' }}
14+
if: ${{ github.repository == 'UiPath/uipath-integrations-python' }}
1515
steps:
1616
- name: Trigger Publish Docs
1717
run: |

.github/workflows/publish.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,21 @@ jobs:
1616
uses: ./.github/workflows/test.yml
1717

1818
build:
19-
name: Build
19+
name: Build ${{ matrix.package }}
2020
runs-on: ubuntu-latest
21+
defaults:
22+
run:
23+
working-directory: packages/${{ matrix.package }}
24+
strategy:
25+
matrix:
26+
package:
27+
- uipath-llamaindex
2128

2229
needs:
2330
- lint
2431
- test
2532

26-
if: ${{ github.repository == 'UiPath/uipath-llamaindex-python' }}
33+
if: ${{ github.repository == 'UiPath/uipath-integrations-python' }}
2734
permissions:
2835
contents: read
2936
actions: write
@@ -51,13 +58,17 @@ jobs:
5158
- name: Upload artifacts
5259
uses: actions/upload-artifact@v4
5360
with:
54-
name: release-dists
55-
path: dist/
61+
name: release-dists-${{ matrix.package }}
62+
path: packages/${{ matrix.package }}/dist/
5663

5764
pypi-publish:
58-
name: Upload release to PyPI
65+
name: Upload ${{ matrix.package }} to PyPI
5966
runs-on: ubuntu-latest
6067
environment: pypi
68+
strategy:
69+
matrix:
70+
package:
71+
- uipath-llamaindex
6172

6273
needs:
6374
- build
@@ -69,7 +80,7 @@ jobs:
6980
- name: Retrieve release distributions
7081
uses: actions/download-artifact@v4
7182
with:
72-
name: release-dists
83+
name: release-dists-${{ matrix.package }}
7384
path: dist/
7485

7586
- name: Publish package distributions to PyPI

.github/workflows/test-custom-version.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,43 @@ on:
1313
types: [opened, synchronize, labeled, unlabeled]
1414

1515
jobs:
16+
discover-packages:
17+
runs-on: ubuntu-latest
18+
if: contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')
19+
outputs:
20+
packages: ${{ steps.discover.outputs.packages }}
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Discover packages
26+
id: discover
27+
run: |
28+
# Find all packages with pyproject.toml
29+
packages_array="[]"
30+
31+
for package_dir in packages/*/pyproject.toml; do
32+
if [ -f "$package_dir" ]; then
33+
package_name=$(echo "$package_dir" | sed 's|packages/\(.*\)/pyproject.toml|\1|')
34+
echo "Found package: $package_name"
35+
packages_array=$(echo "$packages_array" | jq -c ". += [\"$package_name\"]")
36+
fi
37+
done
38+
39+
echo "Packages: $packages_array"
40+
echo "packages=$packages_array" >> $GITHUB_OUTPUT
41+
1642
test-core-dev-version:
17-
name: Test Core Dev Version
43+
name: Test ${{ matrix.package }} - Core Dev Version
44+
needs: [discover-packages]
1845
runs-on: ${{ matrix.os }}
1946
if: contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')
47+
defaults:
48+
run:
49+
working-directory: packages/${{ matrix.package }}
2050
strategy:
2151
matrix:
52+
package: ${{ fromJson(needs.discover-packages.outputs.packages) }}
2253
python-version: ["3.11", "3.12", "3.13"]
2354
os: [ubuntu-latest, windows-latest]
2455

@@ -98,5 +129,4 @@ jobs:
98129
- name: Restore original pyproject.toml
99130
if: always()
100131
shell: bash
101-
run: |
102-
mv pyproject.toml.backup pyproject.toml
132+
run: mv pyproject.toml.backup pyproject.toml

.github/workflows/test.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,41 @@ on:
44
workflow_call:
55

66
jobs:
7+
discover-packages:
8+
runs-on: ubuntu-latest
9+
outputs:
10+
packages: ${{ steps.discover.outputs.packages }}
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Discover packages
16+
id: discover
17+
run: |
18+
# Find all packages with pyproject.toml
19+
packages_array="[]"
20+
21+
for package_dir in packages/*/pyproject.toml; do
22+
if [ -f "$package_dir" ]; then
23+
package_name=$(echo "$package_dir" | sed 's|packages/\(.*\)/pyproject.toml|\1|')
24+
echo "Found package: $package_name"
25+
packages_array=$(echo "$packages_array" | jq -c ". += [\"$package_name\"]")
26+
fi
27+
done
28+
29+
echo "Packages: $packages_array"
30+
echo "packages=$packages_array" >> $GITHUB_OUTPUT
31+
732
test:
8-
name: Test
33+
name: Test ${{ matrix.package }}
34+
needs: [discover-packages]
935
runs-on: ${{ matrix.os }}
36+
defaults:
37+
run:
38+
working-directory: packages/${{ matrix.package }}
1039
strategy:
1140
matrix:
41+
package: ${{ fromJson(needs.discover-packages.outputs.packages) }}
1242
python-version: ["3.11", "3.12", "3.13"]
1343
os: [ubuntu-latest, windows-latest]
1444

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ See `just --list` for linting, formatting and build commands.
3434
### Use SDK Locally
3535
1. Create a folder on your own device `mkdir project; cd project`
3636
2. Initialize the python project `uv` `uv init . --python 3.11`
37-
3. Obtain the project path `PATH_TO_SDK=/Users/YOU_USER/uipath-llamaindex-python/uipath-llamaindex`
37+
3. Obtain the project path `PATH_TO_SDK=/Users/YOU_USER/uipath-integrations-python/packages/uipath-llamaindex`
3838
4. Install the sdk in editable mode `uv add --editable ${PATH_TO_SDK}`
3939

4040
:information_source: Instead of cloning the project into `.venv/lib/python3.11/site-packages/uipath-llamaindex`, this mode creates a file named `_uipath-mcp.pth` inside `.venv/lib/python3.11/site-packages`. This file contains the value of `PATH_TO_SDK`, which is added to `sys.path`—the list of directories where python searches for packages. (Run `python -c 'import sys; print(sys.path)'` to see the entries.)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A Python SDK that enables developers to build and deploy LlamaIndex agents to th
88

99
This package is an extension to the [UiPath Python SDK](https://github.com/UiPath/uipath-python) and implements the [UiPath Runtime Protocol](https://github.com/UiPath/uipath-runtime-python).
1010

11-
Check out these [sample projects](https://github.com/UiPath/uipath-llamaindex-python/tree/main/samples) to see the SDK in action.
11+
Check out these [sample projects](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-llamaindex/samples) to see the SDK in action.
1212

1313
## Requirements
1414

@@ -114,7 +114,7 @@ Check out [uipath-dev](https://github.com/uipath/uipath-dev-python) - an interac
114114

115115
### Setting Up a Development Environment
116116

117-
Please read our [contribution guidelines](https://github.com/UiPath/uipath-llamaindex-python/blob/main/CONTRIBUTING.md) before submitting a pull request.
117+
Please read our [contribution guidelines](https://github.com/UiPath/uipath-integrations-python/packages/uipath-llamaindex/blob/main/CONTRIBUTING.md) before submitting a pull request.
118118

119119
### Special Thanks
120120

0 commit comments

Comments
 (0)