cb930a09创建于 4 天前历史提交
[build-system]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "github-copilot-sdk"
# Placeholder; the real version is injected at publish time (see
# .github/workflows/publish.yml). Kept as a dev sentinel so source/editable
# installs never report a stale real version, matching the .NET and Rust SDKs.
version = "0.0.0.dev0"
description = "Python SDK for GitHub Copilot CLI"
readme = "README.md"
requires-python = ">=3.11"
license = "MIT"
authors = [
    {name = "GitHub", email = "opensource@github.com"}
]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
]
dependencies = [
    "python-dateutil>=2.9.0.post0",
    "pydantic>=2.11",
    "httpx>=0.24.0",
]

[project.urls]
Homepage = "https://github.com/github/copilot-sdk"
Repository = "https://github.com/github/copilot-sdk"

[project.optional-dependencies]
telemetry = [
    "opentelemetry-api>=1.45.1",
]

[dependency-groups]
dev = [
    "ruff==0.17.2",
    "ty>=0.0.2,<0.0.92",
    "pytest>=7.0.0",
    "pytest-asyncio>=0.21.0",
    "pytest-timeout>=2.0.0",
    "pytest-xdist>=3.6.0",
    "websockets>=12.0",
    "opentelemetry-sdk>=1.45.1",
]

[tool.setuptools.packages.find]
where = ["."]
include = ["copilot*"]

[tool.ruff]
line-length = 100
target-version = "py311"
exclude = [
    "generated",
    "copilot/generated",
]

[tool.ruff.lint]
select = [
    "E",  # pycodestyle errors
    "W",  # pycodestyle warnings
    "F",  # pyflakes
    "I",  # isort
    "UP", # pyupgrade
]

[tool.ruff.format]
docstring-code-format = true
quote-style = "double"
indent-style = "space"

[tool.ty.rules]
invalid-argument-type = "warn"

[tool.ty.src]
exclude = [
    "generated",
    "copilot/generated",
    "copilot/test_*.py",
]

[tool.pytest.ini_options]
testpaths = ["."]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
asyncio_mode = "auto"
# Bound every test so a deadlock fails fast with a stack dump instead of occupying the
# whole CI leg until GitHub's 6-hour job limit. The full suite runs in ~10 minutes, so no
# individual test legitimately approaches this.
timeout = 300