Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ on:
secrets:
APPLICATIONINSIGHTS_CONNECTION_STRING:
required: false
REPO_ACCESS:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -44,9 +46,27 @@ jobs:
- name: Install dependencies
run: uv sync --all-extras

- name: Update AGENTS.md
- name: Clone plugin repos for llms-full.txt
if: inputs.package == 'uipath'
working-directory: .
run: |
git clone https://x-access-token:${{ secrets.REPO_ACCESS }}@github.com/UiPath/uipath-langchain-python plugins/uipath-langchain-python
git clone https://x-access-token:${{ secrets.REPO_ACCESS }}@github.com/UiPath/uipath-integrations-python plugins/uipath-integrations-python
git clone https://x-access-token:${{ secrets.REPO_ACCESS }}@github.com/UiPath/uipath-mcp-python plugins/uipath-mcp-python

- name: Symlink plugin docs
if: inputs.package == 'uipath'
run: uv run python scripts/update_agents_md.py
run: |
ln -s ../../../plugins/uipath-langchain-python/docs docs/langchain
ln -s ../../../plugins/uipath-integrations-python/packages/uipath-llamaindex/docs docs/llamaindex
ln -s ../../../plugins/uipath-integrations-python/packages/uipath-openai-agents/docs docs/openai-agents
ln -s ../../../plugins/uipath-mcp-python/docs docs/mcp

- name: Build docs and embed llms-full.txt
if: inputs.package == 'uipath'
run: |
uv run mkdocs build --clean
cp site/llms-full.txt src/uipath/_resources/llms-full.txt

- name: Replace connection string placeholder
if: inputs.package == 'uipath'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ jobs:
needs-relock: true
secrets:
APPLICATIONINSIGHTS_CONNECTION_STRING: ${{ secrets.APPLICATIONINSIGHTS_CONNECTION_STRING }}
REPO_ACCESS: ${{ secrets.REPO_ACCESS }}

publish-uipath:
name: Publish uipath
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
pull_request:
branches:
- main
push:
branches:
- main

permissions:
contents: read
Expand All @@ -21,9 +18,6 @@ jobs:

test:
uses: ./.github/workflows/test-packages.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

check-versions:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/check-version-availability.yml
115 changes: 3 additions & 112 deletions .github/workflows/test-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Test Packages

on:
workflow_call:
secrets:
SONAR_TOKEN:
required: false

permissions:
contents: read
Expand Down Expand Up @@ -80,31 +77,10 @@ jobs:
run: uv sync --all-extras --python ${{ matrix.python-version }}

- name: Run tests
if: steps.check.outputs.skip != 'true' && !(matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13')
if: steps.check.outputs.skip != 'true'
working-directory: packages/uipath-core
run: uv run pytest

- name: Run tests with coverage
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
working-directory: packages/uipath-core
run: uv run pytest --cov-report=xml --cov-report=html --tb=short

- name: Upload coverage HTML report
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always()
uses: actions/upload-artifact@v4
with:
name: coverage-html-uipath-core
path: packages/uipath-core/htmlcov/
retention-days: 30

- name: Upload coverage XML report
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always()
uses: actions/upload-artifact@v4
with:
name: coverage-xml-uipath-core
path: packages/uipath-core/coverage.xml
retention-days: 30

test-uipath-platform:
name: Test (uipath-platform, ${{ matrix.python-version }}, ${{ matrix.os }})
needs: detect-changed-packages
Expand Down Expand Up @@ -150,31 +126,10 @@ jobs:
run: uv sync --all-extras --python ${{ matrix.python-version }}

- name: Run tests
if: steps.check.outputs.skip != 'true' && !(matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13')
if: steps.check.outputs.skip != 'true'
working-directory: packages/uipath-platform
run: uv run pytest

- name: Run tests with coverage
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
working-directory: packages/uipath-platform
run: uv run pytest --cov-report=xml --cov-report=html --tb=short

- name: Upload coverage HTML report
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always()
uses: actions/upload-artifact@v4
with:
name: coverage-html-uipath-platform
path: packages/uipath-platform/htmlcov/
retention-days: 30

- name: Upload coverage XML report
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always()
uses: actions/upload-artifact@v4
with:
name: coverage-xml-uipath-platform
path: packages/uipath-platform/coverage.xml
retention-days: 30

e2e-uipath-platform:
name: E2E (uipath-platform, memory)
needs: detect-changed-packages
Expand Down Expand Up @@ -270,76 +225,12 @@ jobs:
run: uv sync --all-extras --python ${{ matrix.python-version }}

- name: Run tests
if: steps.check.outputs.skip != 'true' && !(matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13')
if: steps.check.outputs.skip != 'true'
working-directory: packages/uipath
run: uv run pytest

- name: Run tests with coverage
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13'
working-directory: packages/uipath
run: uv run pytest --cov-report=xml --cov-report=html --tb=short

- name: Upload coverage HTML report
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always()
uses: actions/upload-artifact@v4
with:
name: coverage-html-uipath
path: packages/uipath/htmlcov/
retention-days: 30

- name: Upload coverage XML report
if: steps.check.outputs.skip != 'true' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' && always()
uses: actions/upload-artifact@v4
with:
name: coverage-xml-uipath
path: packages/uipath/coverage.xml
retention-days: 30

continue-on-error: true

sonarcloud:
name: SonarCloud
needs: [test-uipath-core, test-uipath-platform, test-uipath]
runs-on: ubuntu-latest
if: always() && needs.test-uipath-core.result != 'failure' && needs.test-uipath-platform.result != 'failure' && needs.test-uipath.result != 'failure'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download uipath-core coverage
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: coverage-xml-uipath-core
path: packages/uipath-core

- name: Download uipath-platform coverage
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: coverage-xml-uipath-platform
path: packages/uipath-platform

- name: Download uipath coverage
uses: actions/download-artifact@v4
continue-on-error: true
with:
name: coverage-xml-uipath
path: packages/uipath

- name: Rewrite coverage XML <source> to repo-relative paths
run: |
sed -i 's|<source>src</source>|<source>packages/uipath-core/src</source>|g' packages/uipath-core/coverage.xml || true
sed -i 's|<source>src</source>|<source>packages/uipath-platform/src</source>|g' packages/uipath-platform/coverage.xml || true
sed -i 's|<source>src</source>|<source>packages/uipath/src</source>|g' packages/uipath/coverage.xml || true

- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@2f77a1ec69fb1d595b06f35ab27e97605bdef703 # v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test-gate:
name: Test
needs: [test-uipath-core, test-uipath-platform, test-uipath, e2e-uipath-platform]
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ samples/**/entry-points.json
samples/**/uv.lock

testcases/**/uv.lock

# llms-full.txt is regenerated by `mkdocs build` during the wheel build (CD).
# It ships in the wheel but is not tracked in the repo.
packages/uipath/src/uipath/_resources/llms-full.txt
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cd packages/uipath && uv sync --all-extras
just lint # ruff check + custom httpx linter
just format # ruff format --check
just validate # lint + format
just build # validate + update-agents-md + uv build
just build # validate + uv build
just install # uv sync --all-extras
```

Expand Down
23 changes: 4 additions & 19 deletions packages/uipath-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,15 @@ warn_required_dynamic_aliases = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "-ra -q --cov=src --cov-report=term-missing"
addopts = "-ra -q --cov=src/uipath --cov-report=term-missing"
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"

[tool.coverage.run]
source = ["src"]
relative_files = true
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/site-packages/*",
"*/conftest.py",
]

[tool.coverage.report]
show_missing = true
precision = 2
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@(abc\\.)?abstractmethod",
]

[tool.coverage.run]
source = ["src"]

[[tool.uv.index]]
name = "testpypi"
Expand Down
23 changes: 4 additions & 19 deletions packages/uipath-platform/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,33 +98,18 @@ warn_required_dynamic_aliases = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "-ra -q --cov=src --cov-report=term-missing -m 'not e2e'"
addopts = "-ra -q --cov=src/uipath --cov-report=term-missing -m 'not e2e'"
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"
markers = [
"e2e: end-to-end tests against real ECS/LLMOps (requires UIPATH_URL, UIPATH_ACCESS_TOKEN, UIPATH_FOLDER_KEY)",
]

[tool.coverage.run]
source = ["src"]
relative_files = true
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/site-packages/*",
"*/conftest.py",
]

[tool.coverage.report]
show_missing = true
precision = 2
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@(abc\\.)?abstractmethod",
]

[tool.coverage.run]
source = ["src"]

[tool.uv.sources]
uipath-core = { path = "../uipath-core", editable = true }
Expand Down
8 changes: 4 additions & 4 deletions packages/uipath/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ uv sync --all-extras # Install dependencies
just lint # ruff check + custom httpx linter
just format # ruff format --check
just validate # lint + format
just build # validate + update-agents-md + uv build
just build # validate + uv build
just install # uv sync --all-extras
just test-lint-httpx # Test the custom httpx linter

Expand All @@ -31,9 +31,9 @@ mypy src tests # Type check

`scripts/lint_httpx_client.py` enforces httpx client usage patterns. Run with `just lint` or `python scripts/lint_httpx_client.py`.

### AGENTS.md Generation
### Bundled `llms-full.txt`

`scripts/update_agents_md.py` auto-generates `src/uipath/_resources/AGENTS.md` from agent definitions. Run via `just build` or `just update-agents-md`.
`src/uipath/_resources/llms-full.txt` is regenerated during CD: `build-package.yml` clones the plugin repos, runs `mkdocs build`, and copies `site/llms-full.txt` into `_resources/` before `uv build`. The file is gitignored (build artifact only). `uipath init --with-offline-docs` copies it to `.uipath/llms-full.txt` for users who explicitly opt in.

## CLI Architecture (`src/uipath/_cli/`)

Expand Down Expand Up @@ -95,7 +95,7 @@ Application Insights tracking: `track()`, `track_event()`, `is_telemetry_enabled

## Bundled Resources (`src/uipath/_resources/`)

Documentation files bundled with the package: `AGENTS.md` (auto-generated), `CLAUDE.md`, `CLI_REFERENCE.md`, `SDK_REFERENCE.md`, `REQUIRED_STRUCTURE.md`, `eval.md`, `new-agent.md`.
`AGENTS.md` (template emitted by `uipath init`) and `llms-full.txt` (offline SDK/CLI reference, regenerated by `mkdocs build` during CD; copied into `.uipath/llms-full.txt` when `uipath init --with-offline-docs` is used).

## Test Structure

Expand Down
5 changes: 1 addition & 4 deletions packages/uipath/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ format:

validate: lint format

update-agents-md: validate
python scripts/update_agents_md.py

build: update-agents-md
build: validate
uv build

install:
Expand Down
25 changes: 5 additions & 20 deletions packages/uipath/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath"
version = "2.10.62"
version = "2.10.63"
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
Expand Down Expand Up @@ -137,30 +137,15 @@ warn_required_dynamic_aliases = true
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = "test_*.py"
addopts = "-ra -q --cov=src --cov-report=term-missing"
addopts = "-ra -q --cov"
asyncio_default_fixture_loop_scope = "function"
asyncio_mode = "auto"

[tool.coverage.run]
source = ["src"]
relative_files = true
omit = [
"*/tests/*",
"*/__pycache__/*",
"*/site-packages/*",
"*/conftest.py",
]

[tool.coverage.report]
show_missing = true
precision = 2
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"@(abc\\.)?abstractmethod",
]

[tool.coverage.run]
source = ["src"]

[tool.uv.sources]
uipath-core = { path = "../uipath-core", editable = true }
Expand Down
Loading