-
Notifications
You must be signed in to change notification settings - Fork 27
docs(add-setup-md): add SETUP.md for Agentic Inner Loop KPI #1682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
giuliastf
wants to merge
1
commit into
main
Choose a base branch
from
docs/add-setup-md
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+110
−0
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,110 @@ | ||
| # SETUP.MD | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Python 3.11+ | ||
| - [uv](https://docs.astral.sh/uv/) 0.5+ | ||
|
|
||
| ### Supported platforms | ||
|
|
||
| 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. | ||
|
|
||
| - [x] Linux | ||
| - [ ] Windows | ||
| - [ ] macOS | ||
|
giuliastf marked this conversation as resolved.
|
||
|
|
||
| ## Environment Variables | ||
|
|
||
| ### Standard (injected by pipeline) | ||
|
|
||
| None of the standard pipeline variables are required for environment setup, build, or unit tests. | ||
|
|
||
| ### Project-specific | ||
|
|
||
| None. The unit-test suites under the `Test` section below run fully offline and require no external authentication. | ||
|
|
||
|
giuliastf marked this conversation as resolved.
|
||
| ## Setup | ||
|
|
||
| ```bash | ||
| # Install uv if not already on PATH (no-op when pre-installed by the pipeline) | ||
| python3 -m pip install --upgrade uv | ||
|
|
||
| # Sync all three packages with dev dependencies (dependency order: core → platform → main) | ||
| uv --directory packages/uipath-core sync --all-extras | ||
| uv --directory packages/uipath-platform sync --all-extras | ||
| uv --directory packages/uipath sync --all-extras | ||
|
giuliastf marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| ## Verify Setup | ||
|
|
||
| ```bash | ||
| python3 --version | ||
| uv --version | ||
| uv --directory packages/uipath-core run python -c "import uipath.core; print('uipath-core ok')" | ||
| uv --directory packages/uipath-platform run python -c "import uipath.platform; print('uipath-platform ok')" | ||
| uv --directory packages/uipath run python -c "import uipath; print('uipath ok')" | ||
|
giuliastf marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| ## Build | ||
|
|
||
| ```bash | ||
| uv --directory packages/uipath-core build | ||
| uv --directory packages/uipath-platform build | ||
| uv --directory packages/uipath build | ||
|
giuliastf marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| ## Test | ||
|
|
||
| ```bash | ||
| uv --directory packages/uipath-core run pytest | ||
| uv --directory packages/uipath-platform run pytest | ||
| uv --directory packages/uipath run pytest | ||
| ``` | ||
|
|
||
| > 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. | ||
|
|
||
| ## Sample Code Change | ||
|
|
||
| ### The change | ||
|
|
||
| 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: | ||
|
|
||
| ```python | ||
| @property | ||
| def size(self) -> int: | ||
| """Return the number of currently registered spans.""" | ||
| return len(self._spans) | ||
| ``` | ||
|
|
||
| Then create `packages/uipath-core/tests/tracing/test_span_registry_size.py` with two pytest tests: | ||
|
|
||
| ```python | ||
| from unittest.mock import MagicMock | ||
|
|
||
| from uipath.core.tracing.span_utils import SpanRegistry | ||
|
|
||
|
|
||
| def _make_span(span_id: int) -> MagicMock: | ||
| span = MagicMock() | ||
| span.get_span_context.return_value.span_id = span_id | ||
| span.parent = None # registered as a root span (no parent) | ||
| return span | ||
|
|
||
|
|
||
| def test_size_empty_registry() -> None: | ||
| registry = SpanRegistry() | ||
| assert registry.size == 0 | ||
|
|
||
|
|
||
| def test_size_after_registrations() -> None: | ||
| registry = SpanRegistry() | ||
| registry.register_span(_make_span(1)) | ||
| registry.register_span(_make_span(2)) | ||
| assert registry.size == 2 | ||
| ``` | ||
|
|
||
| ### Verification | ||
|
|
||
| ```bash | ||
| uv --directory packages/uipath-core run pytest tests/tracing/test_span_registry_size.py -v | ||
| ``` | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.