Skip to content

Commit 1ee4a4a

Browse files
committed
docs: add SETUP.MD for Agentic Inner Loop KPI
Adds the SETUP.MD required by the Agentic Inner Loop validation pipeline (MER KPI 11). Documents prerequisites, environment setup, build, test, and a prescribed sample code change so an AI agent can autonomously run the inner dev loop on a clean Linux machine. PRODEV-621
1 parent 335d7bc commit 1ee4a4a

1 file changed

Lines changed: 110 additions & 0 deletions

File tree

SETUP.MD

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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 three packages with dev dependencies (dependency order: core → platform → main)
33+
uv --directory packages/uipath-core sync --all-extras
34+
uv --directory packages/uipath-platform sync --all-extras
35+
uv --directory packages/uipath sync --all-extras
36+
```
37+
38+
## Verify Setup
39+
40+
```bash
41+
python3 --version
42+
uv --version
43+
uv --directory packages/uipath-core run python -c "import uipath.core; print('uipath-core ok')"
44+
uv --directory packages/uipath-platform run python -c "import uipath.platform; print('uipath-platform ok')"
45+
uv --directory packages/uipath run python -c "import uipath; print('uipath ok')"
46+
```
47+
48+
## Build
49+
50+
```bash
51+
uv --directory packages/uipath-core build
52+
uv --directory packages/uipath-platform build
53+
uv --directory packages/uipath build
54+
```
55+
56+
## Test
57+
58+
```bash
59+
uv --directory packages/uipath-core run pytest
60+
uv --directory packages/uipath-platform run pytest
61+
uv --directory packages/uipath run pytest
62+
```
63+
64+
> Note: `uipath-platform`'s `pyproject.toml` already excludes its E2E tests via `addopts = "... -m 'not e2e'"`. `uipath-core` and `uipath` do not register an `e2e` marker.
65+
66+
## Sample Code Change
67+
68+
### The change
69+
70+
Add a new `size` property to `SpanRegistry` in `packages/uipath-core/src/uipath/core/tracing/span_utils.py`, immediately after the `clear` method and before the `# Global span registry instance` comment:
71+
72+
```python
73+
@property
74+
def size(self) -> int:
75+
"""Return the number of currently registered spans."""
76+
return len(self._spans)
77+
```
78+
79+
Then create `packages/uipath-core/tests/tracing/test_span_registry_size.py` with two pytest tests:
80+
81+
```python
82+
from unittest.mock import MagicMock
83+
84+
from uipath.core.tracing.span_utils import SpanRegistry
85+
86+
87+
def _make_span(span_id: int) -> MagicMock:
88+
span = MagicMock()
89+
span.get_span_context.return_value.span_id = span_id
90+
span.parent = None # registered as a root span (no parent)
91+
return span
92+
93+
94+
def test_size_empty_registry() -> None:
95+
registry = SpanRegistry()
96+
assert registry.size == 0
97+
98+
99+
def test_size_after_registrations() -> None:
100+
registry = SpanRegistry()
101+
registry.register_span(_make_span(1))
102+
registry.register_span(_make_span(2))
103+
assert registry.size == 2
104+
```
105+
106+
### Verification
107+
108+
```bash
109+
uv --directory packages/uipath-core run pytest tests/tracing/test_span_registry_size.py -v
110+
```

0 commit comments

Comments
 (0)