Skip to content

Commit 55f5c02

Browse files
committed
fix: other stuff
1 parent 5da150b commit 55f5c02

38 files changed

Lines changed: 4135 additions & 606 deletions

.vscode/settings.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"python-envs.pythonProjects": [],
3+
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
4+
"python.terminal.activateEnvironment": true,
5+
"[python]": {
6+
"editor.defaultFormatter": "charliermarsh.ruff",
7+
"editor.formatOnSave": true,
8+
"editor.codeActionsOnSave": {
9+
"source.fixAll": "explicit",
10+
"source.organizeImports": "explicit"
11+
}
12+
},
13+
"python.testing.pytestEnabled": true,
14+
"python.analysis.typeCheckingMode": "basic",
15+
"files.exclude": {
16+
"**/__pycache__": true,
17+
"**/*.pyc": true,
18+
"**/.pytest_cache": true,
19+
"**/.mypy_cache": true,
20+
"**/.ruff_cache": true
21+
}
22+
}

VENV-SETUP.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Virtual Environment Setup Guide
2+
3+
This repository is configured with individual virtual environments for each package.
4+
5+
## Structure
6+
7+
```
8+
uipath-integrations-python/
9+
├── packages/
10+
│ ├── uipath-llamaindex/
11+
│ │ ├── .venv/ # Virtual environment for llamaindex
12+
│ │ ├── .vscode/ # Package-specific VSCode settings
13+
│ │ └── pyproject.toml
14+
│ └── uipath-openai-agents/
15+
│ ├── .venv/ # Virtual environment for openai-agents
16+
│ ├── .vscode/ # Package-specific VSCode settings
17+
│ └── pyproject.toml
18+
└── uipath-integrations.code-workspace # Multi-root workspace
19+
```
20+
21+
## VSCode Setup
22+
23+
### Option 1: Multi-Root Workspace (Recommended)
24+
25+
1. Open the workspace file:
26+
```bash
27+
code uipath-integrations.code-workspace
28+
```
29+
30+
2. VSCode will automatically detect and use the correct `.venv` for each package folder
31+
32+
3. Each package folder will appear as a separate root in the workspace, with its own interpreter
33+
34+
### Option 2: Individual Package Development
35+
36+
If you want to work on a single package:
37+
38+
1. Open the package directory directly:
39+
```bash
40+
code packages/uipath-llamaindex
41+
# or
42+
code packages/uipath-openai-agents
43+
```
44+
45+
2. Select the interpreter:
46+
- Press `Cmd+Shift+P` (Mac) or `Ctrl+Shift+P` (Windows/Linux)
47+
- Type "Python: Select Interpreter"
48+
- Choose `./.venv/bin/python`
49+
50+
## Virtual Environment Management
51+
52+
### Create/Recreate Virtual Environments
53+
54+
For **uipath-llamaindex**:
55+
```bash
56+
cd packages/uipath-llamaindex
57+
uv venv .venv
58+
uv sync --all-extras
59+
```
60+
61+
For **uipath-openai-agents**:
62+
```bash
63+
cd packages/uipath-openai-agents
64+
uv venv .venv
65+
uv sync --all-extras
66+
```
67+
68+
### Activate Virtual Environments (Terminal)
69+
70+
For **uipath-llamaindex**:
71+
```bash
72+
source packages/uipath-llamaindex/.venv/bin/activate
73+
```
74+
75+
For **uipath-openai-agents**:
76+
```bash
77+
source packages/uipath-openai-agents/.venv/bin/activate
78+
```
79+
80+
### Verify Active Interpreter
81+
82+
```bash
83+
which python
84+
python --version
85+
```
86+
87+
## Benefits of This Setup
88+
89+
1. **Isolation**: Each package has its own dependencies without conflicts
90+
2. **Clarity**: Easy to see which package you're working on
91+
3. **IDE Integration**: VSCode automatically uses the correct interpreter per package
92+
4. **Testing**: Run tests with the exact dependencies for that package
93+
5. **Development**: Install dev dependencies independently per package
94+
95+
## Common Commands Per Package
96+
97+
From within each package directory:
98+
99+
```bash
100+
# Install dependencies
101+
uv sync --all-extras
102+
103+
# Run tests
104+
uv run pytest
105+
106+
# Type checking
107+
uv run mypy --config-file pyproject.toml .
108+
109+
# Linting
110+
uv run ruff check .
111+
112+
# Formatting
113+
uv run ruff format .
114+
```
115+
116+
## Troubleshooting
117+
118+
### VSCode Not Using Correct Interpreter
119+
120+
1. Open Command Palette (`Cmd+Shift+P` / `Ctrl+Shift+P`)
121+
2. Run "Python: Select Interpreter"
122+
3. Choose the `.venv/bin/python` option for the current package
123+
124+
### Virtual Environment Not Found
125+
126+
Recreate it:
127+
```bash
128+
cd packages/<package-name>
129+
uv venv .venv --clear
130+
uv sync --all-extras
131+
```
132+
133+
### Dependencies Out of Sync
134+
135+
```bash
136+
cd packages/<package-name>
137+
uv sync --all-extras --reinstall
138+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"python.defaultInterpreterPath": "${workspaceFolder}/.venv/bin/python",
3+
"python.terminal.activateEnvironment": true,
4+
"python.envFile": "${workspaceFolder}/.env",
5+
"python.testing.pytestEnabled": true,
6+
"python.testing.pytestArgs": [
7+
"tests"
8+
],
9+
"python.analysis.extraPaths": [
10+
"${workspaceFolder}/src"
11+
]
12+
}

0 commit comments

Comments
 (0)