mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: [BREAKING] Cleanup of dependencies (#1803)
* removed extra and non-released deps * added comments * added space and lock * fix pyright config
This commit is contained in:
committed by
GitHub
Unverified
parent
abfdf75cfb
commit
434ffb8ab8
@@ -55,8 +55,7 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
@@ -25,7 +25,6 @@ dependencies = [
|
||||
"agent-framework-core",
|
||||
"azure-ai-projects >= 1.0.0b11",
|
||||
"azure-ai-agents == 1.2.0b5",
|
||||
"aiohttp ~= 3.8",
|
||||
]
|
||||
|
||||
[tool.uv]
|
||||
@@ -55,8 +54,7 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
@@ -55,8 +55,8 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
@@ -80,7 +80,8 @@ class WorkflowViz:
|
||||
import graphviz # type: ignore
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"viz extra is required for export. Install it with: pip install agent-framework[viz] --pre. "
|
||||
"viz extra is required for export. Install it with: pip install graphviz>=0.20.0 "
|
||||
"The version needs to be at least 0.20.0. "
|
||||
"You also need to install graphviz separately. E.g., sudo apt-get install graphviz on Debian/Ubuntu "
|
||||
"or brew install graphviz on macOS. See https://graphviz.org/download/ for details."
|
||||
) from e
|
||||
|
||||
@@ -279,11 +279,17 @@ def _get_azure_monitor_exporters(
|
||||
credential: "TokenCredential | None" = None,
|
||||
) -> list["LogExporter | SpanExporter | MetricExporter"]:
|
||||
"""Create Azure Monitor Exporters, based on the connection strings and optionally the credential."""
|
||||
from azure.monitor.opentelemetry.exporter import (
|
||||
AzureMonitorLogExporter,
|
||||
AzureMonitorMetricExporter,
|
||||
AzureMonitorTraceExporter,
|
||||
)
|
||||
try:
|
||||
from azure.monitor.opentelemetry.exporter import (
|
||||
AzureMonitorLogExporter,
|
||||
AzureMonitorMetricExporter,
|
||||
AzureMonitorTraceExporter,
|
||||
)
|
||||
except ImportError as e:
|
||||
raise ImportError(
|
||||
"azure-monitor-opentelemetry-exporter is required for Azure Monitor exporters. "
|
||||
"Install it with: pip install azure-monitor-opentelemetry-exporter>=1.0.0b41"
|
||||
) from e
|
||||
|
||||
exporters: list["LogExporter | SpanExporter | MetricExporter"] = []
|
||||
for conn_string in connection_strings:
|
||||
|
||||
@@ -22,25 +22,22 @@ classifiers = [
|
||||
"Typing :: Typed",
|
||||
]
|
||||
dependencies = [
|
||||
"openai>=1.99.0,<2",
|
||||
# utilities
|
||||
"typing-extensions",
|
||||
"pydantic>=2,<3",
|
||||
"pydantic-settings>=2,<3",
|
||||
"typing-extensions",
|
||||
# telemetry
|
||||
"opentelemetry-api>=1.24",
|
||||
"opentelemetry-sdk>=1.24",
|
||||
"mcp[ws]>=1.13",
|
||||
"azure-monitor-opentelemetry>=1.7.0",
|
||||
"azure-monitor-opentelemetry-exporter>=1.0.0b41",
|
||||
"opentelemetry-exporter-otlp-proto-grpc>=1.36.0",
|
||||
"opentelemetry-semantic-conventions-ai>=0.4.13",
|
||||
"aiofiles>=24.1.0",
|
||||
# connectors and functions
|
||||
"openai>=1.99.0,<2",
|
||||
"azure-identity>=1,<2",
|
||||
"mcp[ws]>=1.13",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
viz = [
|
||||
"graphviz>=0.20.0"
|
||||
]
|
||||
all = [
|
||||
"agent-framework-a2a",
|
||||
"agent-framework-azure-ai",
|
||||
@@ -48,7 +45,6 @@ all = [
|
||||
"agent-framework-mem0",
|
||||
"agent-framework-redis",
|
||||
"agent-framework-devui",
|
||||
"graphviz>=0.20.0"
|
||||
]
|
||||
|
||||
[tool.uv]
|
||||
@@ -87,8 +83,7 @@ omit = [
|
||||
extend = "../../pyproject.toml"
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
@@ -62,8 +62,8 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
@@ -119,7 +119,7 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
extends = "../../pyproject.toml"
|
||||
exclude = ['gaia/tests', 'lightning/tests', 'tau2/tests', 'namespace', '**/samples']
|
||||
|
||||
[tool.mypy]
|
||||
|
||||
@@ -55,8 +55,8 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
@@ -54,8 +54,8 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
@@ -57,8 +57,7 @@ omit = [
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
extend = "../../pyproject.toml"
|
||||
exclude = ['tests']
|
||||
extends = "../../pyproject.toml"
|
||||
|
||||
[tool.mypy]
|
||||
plugins = ['pydantic.mypy']
|
||||
|
||||
Reference in New Issue
Block a user