From 606c3785586ebd1db074d056a3b1147461f539ac Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 20 Jul 2026 16:14:43 -0700 Subject: [PATCH] Use dependency groups for Python dev deps Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0430f7db-6da1-47a9-9a35-fec3f1bbc17e --- .github/copilot-instructions.md | 2 +- CONTRIBUTING.md | 2 +- justfile | 2 +- python/pyproject.toml | 8 +++++--- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 8ef10ec3a5..79fa9522c9 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -24,7 +24,7 @@ - Format all: `just format` | Lint all: `just lint` | Test all: `just test` - Per-language: - Node: `cd nodejs && npm ci` → `npm test` (Vitest), `npm run generate:session-types` to regenerate session-event types - - Python: `cd python && uv pip install -e ".[dev]"` → `uv run pytest` (E2E tests use the test harness) + - Python: `cd python && uv pip install -e . --group dev` → `uv run pytest` (E2E tests use the test harness) - Go: `cd go && go test ./...` - .NET: `cd dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj` - **.NET testing note:** Never add `InternalsVisibleTo` to any project file when writing tests. Tests must only access public APIs. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b4db1d499..f60625ec15 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,7 @@ This is a multi-language SDK repository. Install the tools for the SDK(s) you pl 1. Install [Python 3.8+](https://www.python.org/downloads/) 1. Install [uv](https://github.com/astral-sh/uv) -1. Install dependencies: `cd python && uv pip install -e ".[dev]"` +1. Install dependencies: `cd python && uv pip install -e . --group dev` ### Go SDK diff --git a/justfile b/justfile index d23e155c8b..c84166862f 100644 --- a/justfile +++ b/justfile @@ -109,7 +109,7 @@ install-go: install-nodejs install-test-harness # Install Python dependencies and prerequisites for tests install-python: install-nodejs install-test-harness @echo "=== Installing Python dependencies ===" - @cd python && uv pip install -e ".[dev]" + @cd python && uv pip install -e . --group dev # Install .NET dependencies and prerequisites for tests install-dotnet: install-nodejs install-test-harness diff --git a/python/pyproject.toml b/python/pyproject.toml index 9a0aba154a..43c18658d4 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -35,6 +35,11 @@ Homepage = "https://github.com/github/copilot-sdk" Repository = "https://github.com/github/copilot-sdk" [project.optional-dependencies] +telemetry = [ + "opentelemetry-api>=1.0.0", +] + +[dependency-groups] dev = [ "ruff>=0.1.0", "ty>=0.0.2,<0.0.25", @@ -44,9 +49,6 @@ dev = [ "websockets>=12.0", "opentelemetry-sdk>=1.0.0", ] -telemetry = [ - "opentelemetry-api>=1.0.0", -] [tool.setuptools.packages.find] where = ["."]