Fixed broken dependencies and added option to use uv instead of pip and venv - #271
Conversation
Python 3.12, azure cli installed
… at the same time. This may not be desired, so may eventually choose to add argparse to implement passing names of which services to start.
… file with the option to run with uv
…ith different version
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the development setup by introducing UV as an alternative Python package manager and improving developer experience. It standardizes Python 3.12 usage, introduces containerized development support, and provides comprehensive documentation for the new setup workflow.
- Added UV support with pyproject.toml configurations for dependency management
- Introduced devcontainer setup for consistent development environments
- Created comprehensive UV-based setup documentation and automation scripts
Reviewed Changes
Copilot reviewed 8 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| mcp/pyproject.toml | Defines MCP service dependencies and Python 3.12 requirement |
| mcp/.python-version | Sets Python 3.12 for MCP service |
| agentic_ai/applications/pyproject.toml | Defines application dependencies and Python 3.12 requirement |
| agentic_ai/applications/.python-version | Sets Python 3.12 for applications |
| agentic_ai/applications/run_applications_uv.sh | Automation script to launch all services with UV |
| agentic_ai/applications/.env.sample | Updated MCP server URI comment for local development |
| SETUP_UV.md | Comprehensive setup guide for UV-based workflow |
| .devcontainer/devcontainer.json | Devcontainer configuration with Python 3.12, Azure CLI, and UV |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| "autogen-agentchat==0.7.4", | ||
| "autogen-ext[mcp]==0.7.4", |
There was a problem hiding this comment.
The autogen versions in the MCP service (0.7.4) differ from those in the applications service (0.7.1). This version mismatch could lead to compatibility issues. Consider aligning these versions to ensure consistent behavior across services.
| "autogen-agentchat==0.7.4", | |
| "autogen-ext[mcp]==0.7.4", | |
| "autogen-agentchat==0.7.1", | |
| "autogen-ext[mcp]==0.7.1", |
| "fastapi==0.115.12", | ||
| "fastmcp==2.7.1", |
There was a problem hiding this comment.
The FastAPI and fastmcp versions in the applications service differ from those in the MCP service (FastAPI 0.116.1, fastmcp 2.12.0). These version mismatches could cause integration issues between the services. Consider standardizing these dependency versions across both services.
| "fastapi==0.115.12", | |
| "fastmcp==2.7.1", | |
| "fastapi==0.116.1", | |
| "fastmcp==2.12.0", |
| }, | ||
|
|
||
| // Use 'postCreateCommand' to run commands after the container is created. | ||
| "postCreateCommand": "pip3 install -r requirements.txt" |
There was a problem hiding this comment.
The postCreateCommand references a requirements.txt file, but this PR introduces pyproject.toml for dependency management with UV. This command should be updated to use UV for dependency installation, such as 'uv sync' or removed if not needed.
| "postCreateCommand": "pip3 install -r requirements.txt" | |
| "postCreateCommand": "uv sync" |
|
|
||
| ### 5. Run MCP Server | ||
|
|
||
| Navigate to ```agentic_ai/backend_services``` folder, and in terminal window with virtual environment activated, run MCP server |
There was a problem hiding this comment.
The documentation references 'agentic_ai/backend_services' folder, but based on the file structure shown in this PR, the MCP service is located in the 'mcp' folder at the project root. This path should be corrected to 'mcp' folder.
| Navigate to ```agentic_ai/backend_services``` folder, and in terminal window with virtual environment activated, run MCP server | |
| Navigate to the ```mcp``` folder at the project root, and in a terminal window with virtual environment activated, run the MCP server |
| ### Option 1: Run Both Backend and Frontend Together | ||
|
|
||
| ```bash | ||
| bash run_application.sh |
There was a problem hiding this comment.
The documentation references 'run_application.sh' but the actual script created in this PR is named 'run_applications_uv.sh'. The documentation should be updated to reference the correct script name.
| bash run_application.sh | |
| bash run_applications_uv.sh |
7b8eecc
into
microsoft:main
This pull request introduces significant improvements to the development environment and setup process for the AI Agentic Workshop project. The main changes include adding devcontainer support for a consistent development experience, introducing Python 3.12 as the required version across both the application and MCP service, providing a comprehensive setup guide for using UV as the Python manager, and defining project dependencies for both the application and MCP service using
pyproject.toml. Additionally, a new script is added to streamline launching all services with UV. These updates make onboarding and running the project easier and more reliable.Development Environment Setup
.devcontainer/devcontainer.jsonto enable containerized development with Python 3.12, Azure CLI, and UV, including VS Code customization and port forwarding..python-versionfor bothagentic_ai/applicationsandmcpdirectories to ensure consistency.Project Dependency Management
pyproject.tomlfiles for bothagentic_ai/applicationsandmcpto define project metadata and dependencies, ensuring reproducible environments. [1] [2]Setup Documentation and Scripts
SETUP_UV.md, a detailed guide for cloning, configuring, and running the project using UV, including environment variable setup, backend/frontend instructions, and best practices.run_applications_uv.shto automate starting the MCP server, backend, and frontend with logging, simplifying multi-service startup.Configuration Updates
.env.sampleto clarify local MCP server URI usage (/mcpinstead of/sse) for improved developer clarity.