|
| 1 | +# SETUP.MD |
| 2 | + |
| 3 | +## Prerequisites |
| 4 | + |
| 5 | +- Python 3.11+ |
| 6 | +- [uv](https://docs.astral.sh/uv/) 0.5+ |
| 7 | + |
| 8 | +### Supported platforms |
| 9 | + |
| 10 | +This checklist controls the Agentic Inner Loop KPI pipeline targets (clean Linux VM). The repo's own GitHub Actions CI additionally tests on `windows-latest`, but that is not measured by this KPI. |
| 11 | + |
| 12 | +- [x] Linux |
| 13 | +- [ ] Windows |
| 14 | +- [ ] macOS |
| 15 | + |
| 16 | +## Environment Variables |
| 17 | + |
| 18 | +### Standard (injected by pipeline) |
| 19 | + |
| 20 | +None of the standard pipeline variables are required for environment setup, build, or unit tests. |
| 21 | + |
| 22 | +### Project-specific |
| 23 | + |
| 24 | +None. The unit-test suites under the `Test` section below run fully offline and require no external authentication. |
| 25 | + |
| 26 | +## Setup |
| 27 | + |
| 28 | +```bash |
| 29 | +# Install uv if not already on PATH (no-op when pre-installed by the pipeline) |
| 30 | +python3 -m pip install --upgrade uv |
| 31 | + |
| 32 | +# Sync all five packages with dev dependencies (each is independent) |
| 33 | +uv --directory packages/uipath-agent-framework sync --all-extras |
| 34 | +uv --directory packages/uipath-google-adk sync --all-extras |
| 35 | +uv --directory packages/uipath-llamaindex sync --all-extras |
| 36 | +uv --directory packages/uipath-openai-agents sync --all-extras |
| 37 | +uv --directory packages/uipath-pydantic-ai sync --all-extras |
| 38 | +``` |
| 39 | + |
| 40 | +## Verify Setup |
| 41 | + |
| 42 | +```bash |
| 43 | +python3 --version |
| 44 | +uv --version |
| 45 | +uv --directory packages/uipath-agent-framework run python -c "import uipath_agent_framework; print('uipath-agent-framework ok')" |
| 46 | +uv --directory packages/uipath-google-adk run python -c "import uipath_google_adk; print('uipath-google-adk ok')" |
| 47 | +uv --directory packages/uipath-llamaindex run python -c "import uipath_llamaindex; print('uipath-llamaindex ok')" |
| 48 | +uv --directory packages/uipath-openai-agents run python -c "import uipath_openai_agents; print('uipath-openai-agents ok')" |
| 49 | +uv --directory packages/uipath-pydantic-ai run python -c "import uipath_pydantic_ai; print('uipath-pydantic-ai ok')" |
| 50 | +``` |
| 51 | + |
| 52 | +## Build |
| 53 | + |
| 54 | +```bash |
| 55 | +uv --directory packages/uipath-agent-framework build |
| 56 | +uv --directory packages/uipath-google-adk build |
| 57 | +uv --directory packages/uipath-llamaindex build |
| 58 | +uv --directory packages/uipath-openai-agents build |
| 59 | +uv --directory packages/uipath-pydantic-ai build |
| 60 | +``` |
| 61 | + |
| 62 | +## Test |
| 63 | + |
| 64 | +```bash |
| 65 | +uv --directory packages/uipath-agent-framework run pytest |
| 66 | +uv --directory packages/uipath-google-adk run pytest |
| 67 | +uv --directory packages/uipath-llamaindex run pytest |
| 68 | +uv --directory packages/uipath-openai-agents run pytest |
| 69 | +uv --directory packages/uipath-pydantic-ai run pytest |
| 70 | +``` |
| 71 | + |
| 72 | +## Sample Code Change |
| 73 | + |
| 74 | +### The change |
| 75 | + |
| 76 | +Add a new `agent_count` property to `PydanticAiConfig` in `packages/uipath-pydantic-ai/src/uipath_pydantic_ai/runtime/config.py`, immediately after the existing `entrypoint` property: |
| 77 | + |
| 78 | +```python |
| 79 | +@property |
| 80 | +def agent_count(self) -> int: |
| 81 | + """Number of agents defined in the configuration.""" |
| 82 | + return len(self.agents) |
| 83 | +``` |
| 84 | + |
| 85 | +Then create `packages/uipath-pydantic-ai/tests/test_config_agent_count.py` with two pytest tests: |
| 86 | + |
| 87 | +```python |
| 88 | +"""Tests for PydanticAiConfig.agent_count.""" |
| 89 | + |
| 90 | +import json |
| 91 | +from pathlib import Path |
| 92 | + |
| 93 | +from uipath_pydantic_ai.runtime.config import PydanticAiConfig |
| 94 | + |
| 95 | + |
| 96 | +def test_agent_count_single(tmp_path: Path) -> None: |
| 97 | + config_path = tmp_path / "pydantic_ai.json" |
| 98 | + config_path.write_text(json.dumps({"agents": {"main": "main:agent"}})) |
| 99 | + cfg = PydanticAiConfig(str(config_path)) |
| 100 | + assert cfg.agent_count == 1 |
| 101 | + |
| 102 | + |
| 103 | +def test_agent_count_multiple(tmp_path: Path) -> None: |
| 104 | + config_path = tmp_path / "pydantic_ai.json" |
| 105 | + config_path.write_text( |
| 106 | + json.dumps( |
| 107 | + { |
| 108 | + "agents": { |
| 109 | + "alpha": "alpha:agent", |
| 110 | + "beta": "beta:agent", |
| 111 | + "gamma": "gamma:agent", |
| 112 | + } |
| 113 | + } |
| 114 | + ) |
| 115 | + ) |
| 116 | + cfg = PydanticAiConfig(str(config_path)) |
| 117 | + assert cfg.agent_count == 3 |
| 118 | +``` |
| 119 | + |
| 120 | +### Verification |
| 121 | + |
| 122 | +```bash |
| 123 | +uv --directory packages/uipath-pydantic-ai run pytest tests/test_config_agent_count.py -v |
| 124 | +``` |
0 commit comments