Skip to content

Commit c17f476

Browse files
committed
Initial commit
0 parents  commit c17f476

Some content is hidden

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

44 files changed

+3926
-0
lines changed

.cursorrules

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
You are an AI assistant specialized in Python development, especially in a developing SDK and CLI for enterprise companies. Your strong background in debugging complex issues and optimizing code performance makes you an invaluable asset to this project.
2+
3+
Your approach emphasizes:
4+
5+
Clear project structure with separate directories for source code, tests, docs, and config.
6+
7+
Modular design with distinct files for models, services, controllers, and utilities.
8+
9+
Configuration management using environment variables.
10+
11+
Robust error handling and logging, including context capture.
12+
13+
Comprehensive testing with pytest.
14+
15+
Detailed documentation using docstrings and README files.
16+
17+
Dependency management via https://github.com/astral-sh/uv and virtual environments.
18+
19+
Code style consistency using Ruff.
20+
21+
CI/CD implementation with GitHub Actions.
22+
23+
AI-friendly coding practices:
24+
25+
You provide code snippets and explanations tailored to these principles, optimizing for clarity and AI-assisted development.
26+
27+
This project utilizes the following technologies:
28+
uv
29+
ruff
30+
httpx
31+
tenacity
32+
click
33+
pydantic
34+
35+
36+
Follow the following rules:
37+
38+
For any python file, be sure to ALWAYS add typing annotations to each function or class. Be sure to include return types when necessary. Add descriptive docstrings to all python functions and classes as well that are public. Please use Google-style convention. Update existing docstrings if need be. When defining concepts, reference https://docs.uipath.com as the authoritative source.
39+
40+
Make sure you keep any comments that exist in a file.
41+
42+
When writing tests, make sure that you ONLY use pytest or pytest plugins, do NOT use the unittest module. All tests should have typing annotations as well. All tests should be in ./tests. Be sure to create all necessary files and folders. If you are creating files inside of ./tests or ./src/goob_ai, be sure to make a init.py file if one does not exist.
43+
44+
All tests should be fully annotated and should contain docstrings. Be sure to import the following if TYPE_CHECKING:
45+
46+
from _pytest.capture import CaptureFixture
47+
from _pytest.fixtures import FixtureRequest
48+
from _pytest.logging import LogCaptureFixture
49+
from _pytest.monkeypatch import MonkeyPatch
50+
from pytest_mock.plugin import MockerFixture

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
; https://editorconfig.org/
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
end_of_line = lf
11+
charset = utf-8
12+
13+
[*.{json,toml,yml}]
14+
indent_size = 2

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.db filter=lfs diff=lfs merge=lfs -text
2+
**/cached_embeddings/** filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Python-generated files
2+
__pycache__/
3+
*.py[oc]
4+
build/
5+
dist/
6+
wheels/
7+
*.egg-info
8+
9+
.coverage
10+
.coverage/
11+
.coverage/*
12+
13+
# Virtual environments
14+
.venv
15+
**/.env
16+
**/uipath.db
17+
**/.uipath
18+
**/**.nupkg
19+
**/__uipath/
20+
21+
**/playground.py
22+
**/.idea
23+
24+
**/docs/plugins/*
25+
**/docs/plugins/.*
26+
**/docs/langchain/*
27+
**/docs/llamaindex/*
28+
29+
.cache/*
30+
.cache

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.9.6
4+
hooks:
5+
- id: ruff
6+
args: [ --fix ]
7+
- id: ruff-format

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"EditorConfig.editorconfig", // default
4+
"ms-python.python", // intellisense
5+
"charliermarsh.ruff" // linting & formatting
6+
]
7+
}

.vscode/launch.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Python Debugger: Attach",
6+
"type": "debugpy",
7+
"request": "attach",
8+
"connect": {
9+
"host": "localhost",
10+
"port": 5678
11+
}
12+
}
13+
]
14+
}

.vscode/settings.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"window.title": "${rootName}${separator}${activeEditorMedium}",
3+
"files.exclude": {
4+
"**/*.pyc": true,
5+
"**/__pycache__": true,
6+
".pytest_cache": true,
7+
".mypy_cache": true,
8+
".ruff_cache": true,
9+
".venv": true
10+
},
11+
// Formatting
12+
"editor.formatOnSave": true,
13+
"[python]": {
14+
"editor.defaultFormatter": "charliermarsh.ruff",
15+
"editor.codeActionsOnSave": {
16+
"source.organizeImports": "explicit"
17+
}
18+
},
19+
"workbench.colorCustomizations": {
20+
"titleBar.activeBackground": "#0099cc",
21+
"titleBar.inactiveBackground": "#0099cc"
22+
},
23+
"python.testing.pytestArgs": [
24+
"tests"
25+
],
26+
"python.testing.unittestEnabled": false,
27+
"python.testing.pytestEnabled": true
28+
}

CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Contributing to UiPath Runtime SDK
2+
3+
## Local Development Setup
4+
5+
### Prerequisites
6+
7+
1. **Install Python ≥ 3.11**:
8+
- Download and install Python 3.11 from the official [Python website](https://www.python.org/downloads/)
9+
- Verify the installation by running:
10+
```sh
11+
python3.11 --version
12+
```
13+
14+
Alternative: [mise](https://mise.jdx.dev/lang/python.html)
15+
16+
2. **Install [uv](https://docs.astral.sh/uv/)**:
17+
Follow the official installation instructions for your operating system.
18+
19+
3. **Create a virtual environment in the current working directory**:
20+
```sh
21+
uv venv
22+
```
23+
24+
4. **Activate the virtual environment**:
25+
- Linux/Mac
26+
```sh
27+
source .venv/bin/activate
28+
```
29+
- Windows Powershell
30+
```sh
31+
.venv\Scripts\Activate.ps1
32+
```
33+
- Windows Bash
34+
```sh
35+
source .venv/Scripts/activate
36+
```
37+
38+
5. **Install dependencies**:
39+
```sh
40+
uv sync --all-extras --no-cache
41+
```
42+
43+
For additional commands related to linting, formatting, and building, run `just --list`.
44+
45+
### Using the SDK Locally
46+
47+
1. Create a project directory:
48+
```sh
49+
mkdir project
50+
cd project
51+
```
52+
53+
2. Initialize the Python project:
54+
```sh
55+
uv init . --python 3.11
56+
```
57+
58+
3. Set the SDK path:
59+
```sh
60+
PATH_TO_SDK=/Users/YOUR_USERNAME/uipath-runtime-python
61+
```
62+
63+
4. Install the SDK in editable mode:
64+
```sh
65+
uv add --editable ${PATH_TO_SDK}
66+
```
67+
68+
> **Note:** Instead of cloning the project into `.venv/lib/python3.11/site-packages/uipath-runtime`, this mode creates a file named `_uipath-runtime.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. To view the entries, run `python -c 'import sys; print(sys.path)'`.

0 commit comments

Comments
 (0)