Skip to content

Migrate BYO Activity samples to uv - #1065

Open
Antriksh Jain (antriksh30) wants to merge 2 commits into
mainfrom
migrate-byo-activity-to-uv
Open

Antriksh Jain (antriksh30) wants to merge 2 commits into
mainfrom
migrate-byo-activity-to-uv

Conversation

@antriksh30

Copy link
Copy Markdown
Contributor

Summary

  • migrate the BYO Activity echo and github-copilot hosted runtimes from requirements.txt to pyproject.toml, uv.lock, and uv.toml
  • update both Python 3.13 containers and local debugging guidance to use frozen uv environments while preserving every original direct dependency
  • keep Starlette transitively managed by AgentServer and avoid a global prerelease policy; the explicit Activity beta pin resolves without it
  • preserve the Copilot sample's intentional runtime pip capability for model-generated Office and PDF files

Validation

  • uv lock --check and frozen production export for both projects
  • built both container images and verified their /app/user_agent/.venv/bin/python commands
  • imported the Activity host in both images and the Copilot SDK stack in the assistant image
  • verified runtime pip remains available in the Copilot image
  • Python source compilation and dependency declaration parity checks
  • hosted-agent dependency policy with --resolve
  • hosted-agent contract policy
  • git diff --check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ec0a8f22-0687-4209-912b-1d5f4c4263f1
@antriksh30
Antriksh Jain (antriksh30) requested a review from a team as a code owner October 12, 2026 11:21
Copilot AI balanced review requested due to automatic review settings October 12, 2026 11:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The migration follows the repository’s uv dependency policy, with only minor capitalization corrections noted.

2 open findings
What changed in this PR

Migrates both BYO Activity samples to reproducible uv-managed Python 3.13 environments.

Changes:

  • Replaces requirements.txt with pyproject.toml, uv.lock, and uv.toml.
  • Updates containers to install and run from frozen uv environments.
  • Refreshes local-development documentation and prerequisites.
File Description
github-copilot/​AGENTS.md Documents uv workflow and project files.
github-copilot/​README.md Updates prerequisites and debugging steps.
github-copilot/​src/​github-copilot-activity/​.env.example Updates the local-run command.
github-copilot/​src/​github-copilot-activity/​Dockerfile Builds and runs from the uv environment.
github-copilot/​src/​github-copilot-activity/​pyproject.toml Declares project dependencies.
github-copilot/​src/​github-copilot-activity/​requirements.txt Removes the legacy dependency manifest.
github-copilot/​src/​github-copilot-activity/​uv.lock Locks the resolved dependency graph.
github-copilot/​src/​github-copilot-activity/​uv.toml Enables system certificates for uv.
echo/​AGENTS.md Documents uv workflow and project files.
echo/​README.md Updates prerequisites and debugging steps.
echo/​src/​echo-activity/​Dockerfile Builds and runs from the uv environment.
echo/​src/​echo-activity/​pyproject.toml Declares project dependencies.
echo/​src/​echo-activity/​requirements.txt Removes the legacy dependency manifest.
echo/​src/​echo-activity/​uv.lock Locks the resolved dependency graph.
echo/​src/​echo-activity/​uv.toml Enables system certificates for uv.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread samples/python/hosted-agents/bring-your-own/activity/echo/AGENTS.md Outdated
Comment thread samples/python/hosted-agents/bring-your-own/activity/github-copilot/AGENTS.md Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: ec0a8f22-0687-4209-912b-1d5f4c4263f1
Copilot AI balanced review requested due to automatic review settings October 12, 2026 11:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Both READMEs describe F5 workflows backed by VS Code configuration files that are not present.

0 open findings

2 resolved since last review
Previously missed (2)

In code that hasn't changed since last review

Medium severity Missing VS Code launch and task configurations

samples/​python/​hosted-agents/​bring-your-own/​activity/​echo/​README.md:101

The repository contains no src/echo-activity/.vscode/launch.json or tasks.json, so pressing F5 cannot start the agent with this uv environment or launch/clean up Agents Playground as described. Please either commit those configurations with the .venv interpreter or replace this section with the actual manual launch workflow.

Medium severity Missing VS Code debug configurations

samples/​python/​hosted-agents/​bring-your-own/​activity/​github-copilot/​README.md:169

src/github-copilot-activity has no committed .vscode/launch.json or tasks.json, so this directory will not show the promised configuration and the later F5/pre- and post-debug behavior cannot occur. Please add the referenced configurations with the uv interpreter or document a manual launch workflow instead.

🧠 Review effort: Balanced

This branch was successfully deployed

1 active deployment
L4-validation — 58b1fd89 Deployed Oct 12, 2026 by antriksh30 via trusted #500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants