Skip to content

Commit 053e2b3

Browse files
authored
use uv instead of poetry (#663)
1 parent ca95ffb commit 053e2b3

Some content is hidden

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

41 files changed

+3084
-7224
lines changed
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,16 @@ jobs:
4848
run: |
4949
source common.sh && wait_for_healthz http://localhost:10000/healthz
5050
51-
- name: install poetry
52-
run: |
53-
export POETRY_VERSION=2.2.1
54-
curl -sSL https://install.python-poetry.org | python3 -
55-
export PATH="$HOME/.local/bin:$PATH"
51+
- name: install uv
52+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
5653

5754
- name: install test dependencies
5855
run: |
59-
poetry install
56+
uv sync
6057
6158
- name: run plano tests
6259
run: |
63-
poetry run pytest || tail -100 plano.logs
60+
uv run pytest || tail -100 plano.logs
6461
6562
- name: stop plano docker container
6663
env:

.github/workflows/e2e_test_currency_convert.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ jobs:
2626
run: |
2727
docker build -f Dockerfile . -t katanemo/plano -t katanemo/plano:0.4.0
2828
29-
- name: install poetry
30-
run: |
31-
export POETRY_VERSION=2.2.1
32-
curl -sSL https://install.python-poetry.org | python3 -
29+
- name: install uv
30+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
3331

3432
- name: setup python venv
3533
run: |
@@ -43,8 +41,8 @@ jobs:
4341
- name: install arch gateway and test dependencies
4442
run: |
4543
source venv/bin/activate
46-
cd cli && echo "installing plano cli" && poetry install
47-
cd ../demos/shared/test_runner && echo "installing test dependencies" && poetry install
44+
cd cli && echo "installing plano cli" && uv sync && uv tool install .
45+
cd ../demos/shared/test_runner && echo "installing test dependencies" && uv sync
4846
4947
- name: run demo tests
5048
env:

.github/workflows/e2e_test_preference_based_routing.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ jobs:
2626
run: |
2727
docker build -f Dockerfile . -t katanemo/plano -t katanemo/plano:0.4.0
2828
29-
- name: install poetry
30-
run: |
31-
export POETRY_VERSION=2.2.1
32-
curl -sSL https://install.python-poetry.org | python3 -
29+
- name: install uv
30+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
3331

3432
- name: setup python venv
3533
run: |
@@ -43,8 +41,8 @@ jobs:
4341
- name: install arch gateway and test dependencies
4442
run: |
4543
source venv/bin/activate
46-
cd cli && echo "installing plano cli" && poetry install
47-
cd ../demos/shared/test_runner && echo "installing test dependencies" && poetry install
44+
cd cli && echo "installing plano cli" && uv sync && uv tool install .
45+
cd ../demos/shared/test_runner && echo "installing test dependencies" && uv sync
4846
4947
- name: run demo tests
5048
env:

.github/workflows/e2e_tests.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,8 @@ jobs:
4545
with:
4646
python-version: "3.12"
4747

48-
- name: Install Poetry
49-
run: |
50-
export POETRY_VERSION=2.2.1
51-
curl -sSL https://install.python-poetry.org | python3 -
52-
export PATH="$HOME/.local/bin:$PATH"
48+
- name: Install uv
49+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
5350

5451
- name: Run e2e tests
5552
env:

.github/workflows/plano_tools_tests.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,13 @@ jobs:
2525
with:
2626
python-version: "3.12"
2727

28-
- name: install poetry
29-
run: |
30-
export POETRY_VERSION=2.2.1
31-
curl -sSL https://install.python-poetry.org | python3 -
32-
export PATH="$HOME/.local/bin:$PATH"
28+
- name: install uv
29+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
3330

3431
- name: install plano tools
3532
run: |
36-
poetry install
33+
uv sync --extra dev
3734
3835
- name: run tests
3936
run: |
40-
poetry run pytest
37+
uv run pytest

.github/workflows/publish-pypi.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@ jobs:
2424
with:
2525
python-version: "3.12"
2626

27-
- name: install poetry
28-
run: |
29-
export POETRY_VERSION=2.2.1
30-
curl -sSL https://install.python-poetry.org | python3 -
31-
export PATH="$HOME/.local/bin:$PATH"
27+
- name: install uv
28+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
3229

3330
- name: Build and publish to PyPI
3431
env:
35-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
32+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
3633
run: |
37-
poetry publish --build
34+
uv build
35+
uv publish

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,5 @@ apps/*/out/
145145
apps/*/dist/
146146
./node_modules
147147
.vercel
148+
149+
*.logs

Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,22 @@ COPY --from=builder /arch/target/release/brightstaff /app/brightstaff
3030
COPY --from=envoy /usr/local/bin/envoy /usr/local/bin/envoy
3131

3232
WORKDIR /app
33-
COPY config/requirements.txt .
34-
RUN pip install -r requirements.txt
33+
34+
# Install uv using pip
35+
RUN pip install --no-cache-dir uv
36+
37+
# Copy Python dependency files
38+
COPY cli/pyproject.toml ./
39+
COPY cli/uv.lock ./
40+
COPY cli/README.md ./
41+
42+
RUN uv run pip install --no-cache-dir .
43+
44+
# Copy the rest of the application
3545
COPY cli .
3646
COPY config/envoy.template.yaml .
3747
COPY config/arch_config_schema.yaml .
3848
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
39-
40-
RUN pip install requests
4149
RUN mkdir -p /var/log/supervisor && touch /var/log/envoy.log /var/log/supervisor/supervisord.log
4250

4351
RUN mkdir -p /var/log && \

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,19 @@ Before you begin, ensure you have the following:
5858
Plano's CLI allows you to manage and interact with the Plano gateway efficiently. To install the CLI, simply run the following command:
5959

6060
> [!TIP]
61-
> We recommend that developers create a new Python virtual environment to isolate dependencies before installing Plano. This ensures that plano and its dependencies do not interfere with other packages on your system.
61+
> We recommend using **uv** for fast, reliable Python package management. Install uv if you haven't already:
62+
>
63+
> ```console
64+
> $ curl -LsSf https://astral.sh/uv/install.sh | sh
65+
> ```
66+
67+
**Option 1: Install planoai with uv (Recommended)**
68+
69+
```console
70+
$ uv tool install planoai==0.4.0
71+
```
72+
73+
**Option 2: Install with pip (Traditional)**
6274

6375
```console
6476
$ python3.12 -m venv venv
@@ -161,6 +173,8 @@ Run your `flight_agent` and `hotel_agent` services (see the [Orchestration guide
161173

162174
```console
163175
$ planoai up plano_config.yaml
176+
# Or if installed with uv tool:
177+
$ uvx planoai up plano_config.yaml
164178
```
165179

166180
Plano will start the orchestrator and expose an agent listener on port `8001`.

cli/README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,36 +31,44 @@ pip uninstall planoai
3131

3232
This guide will walk you through the steps to set up the plano cli on your local machine when you want to develop the plano CLI
3333

34-
### Step 1: Create a Python virtual environment
34+
### Step 1: Install uv
3535

36-
In the tools directory, create a Python virtual environment by running:
36+
Install uv if you haven't already:
3737

3838
```bash
39-
python -m venv venv
39+
curl -LsSf https://astral.sh/uv/install.sh | sh
4040
```
4141

42-
### Step 2: Activate the virtual environment
43-
* On Linux/MacOS:
42+
### Step 2: Create a Python virtual environment and install dependencies
43+
44+
In the cli directory, run:
4445

4546
```bash
46-
source venv/bin/activate
47+
uv sync
4748
```
4849

49-
### Step 3: Run the build script
50+
This will create a virtual environment and install all dependencies.
51+
52+
### Step 3: Activate the virtual environment (optional)
53+
54+
uv will automatically use the virtual environment, but if you need to activate it manually:
55+
56+
* On Linux/MacOS:
57+
5058
```bash
51-
poetry install
59+
source .venv/bin/activate
5260
```
5361

5462
### Step 4: build Arch
5563
```bash
56-
planoai build
64+
uv run planoai build
5765
```
5866

5967
### Logs
6068
`plano` command can also view logs from the gateway. Use following command to view logs,
6169

6270
```bash
63-
planoai logs --follow
71+
uv run planoai logs --follow
6472
```
6573

6674
## Uninstall Instructions: plano CLI

0 commit comments

Comments
 (0)