Skip to content

Commit 1d9806c

Browse files
authored
Merge pull request #3 from madebygps/uv-migration
Add uv and pyproject.tom
2 parents 80b7d0c + 123d04e commit 1d9806c

8 files changed

Lines changed: 2303 additions & 33 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
FROM mcr.microsoft.com/devcontainers/python:3.12-bookworm
22

3-
COPY requirements.txt /tmp/pip-tmp/
3+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
44

5-
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
6-
&& rm -rf /tmp/pip-tmp
5+
COPY pyproject.toml uv.lock /tmp/uv-tmp/
6+
7+
RUN cd /tmp/uv-tmp && uv sync --no-cache \
8+
&& rm -rf /tmp/uv-tmp

README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ A related option is VS Code Dev Containers, which will open the project in your
6363
1. Make sure the following tools are installed:
6464

6565
* [Python 3.10+](https://www.python.org/downloads/)
66+
* [uv](https://docs.astral.sh/uv/getting-started/installation/)
6667
* Git
6768

6869
2. Clone the repository:
@@ -72,17 +73,10 @@ A related option is VS Code Dev Containers, which will open the project in your
7273
cd python-agentframework-demos
7374
```
7475

75-
3. Set up a virtual environment:
76+
3. Install the dependencies:
7677

7778
```shell
78-
python -m venv .venv
79-
source .venv/bin/activate # On Windows: .venv\Scripts\activate
80-
```
81-
82-
4. Install the requirements:
83-
84-
```shell
85-
pip install -r requirements.txt
79+
uv sync
8680
```
8781

8882
## Configuring model providers

examples/spanish/README.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Una opción relacionada es VS Code Dev Containers, que abrirá el proyecto en tu
6464
1. Asegúrate de tener instaladas las siguientes herramientas:
6565

6666
* [Python 3.10+](https://www.python.org/downloads/)
67+
* [uv](https://docs.astral.sh/uv/getting-started/installation/)
6768
* Git
6869

6970
2. Clona el repositorio:
@@ -73,17 +74,10 @@ Una opción relacionada es VS Code Dev Containers, que abrirá el proyecto en tu
7374
cd python-agentframework-demos
7475
```
7576

76-
3. Configura un entorno virtual:
77+
3. Instala las dependencias:
7778

7879
```shell
79-
python -m venv .venv
80-
source .venv/bin/activate # En Windows: .venv\Scripts\activate
81-
```
82-
83-
4. Instala los requisitos:
84-
85-
```shell
86-
pip install -r requirements.txt
80+
uv sync
8781
```
8882

8983
## Configurar proveedores de modelos

examples/spanish/workflow.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pip install agent-framework-devui==1.0.0b251016
21
import os
32
from typing import Any
43

examples/workflow.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pip install agent-framework-devui==1.0.0b251016
21
import os
32
from typing import Any
43

pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
[project]
2+
name = "python-agentframework-demos"
3+
version = "0.1.0"
4+
description = "Collection of Python examples for Microsoft Agent Framework"
5+
requires-python = ">=3.10"
6+
dependencies = [
7+
"azure-identity",
8+
"openai>=1.109.1",
9+
"python-dotenv",
10+
"pydantic",
11+
"rich",
12+
"dotenv-azd",
13+
"aiohttp",
14+
"faker",
15+
"agent-framework-core @ git+https://github.com/microsoft/agent-framework.git@98cd72839e4057d661a58092a3b013993264d834#subdirectory=python/packages/core",
16+
"agent-framework-devui @ git+https://github.com/microsoft/agent-framework.git@98cd72839e4057d661a58092a3b013993264d834#subdirectory=python/packages/devui",
17+
]
18+
119
[tool.ruff]
220
line-length = 120
321
target-version = "py310"

requirements.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

uv.lock

Lines changed: 2274 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)