Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions python/packages/a2a/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"

[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
4 changes: 1 addition & 3 deletions python/packages/azure-ai/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -55,8 +54,7 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"

[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
4 changes: 2 additions & 2 deletions python/packages/copilotstudio/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"


[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
3 changes: 2 additions & 1 deletion python/packages/core/agent_framework/_workflows/_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def export(self, format: Literal["svg", "png", "pdf", "dot"] = "svg", filename:
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
Expand Down
16 changes: 11 additions & 5 deletions python/packages/core/agent_framework/observability.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
19 changes: 7 additions & 12 deletions python/packages/core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,29 @@ 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",
"agent-framework-copilotstudio",
"agent-framework-mem0",
"agent-framework-redis",
"agent-framework-devui",
"graphviz>=0.20.0"
]

[tool.uv]
Expand Down Expand Up @@ -87,8 +83,7 @@ omit = [
extend = "../../pyproject.toml"

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"

[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
4 changes: 2 additions & 2 deletions python/packages/devui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"


[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
2 changes: 1 addition & 1 deletion python/packages/lab/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
extends = "../../pyproject.toml"
exclude = ['gaia/tests', 'lightning/tests', 'tau2/tests', 'namespace', '**/samples']

[tool.mypy]
Expand Down
4 changes: 2 additions & 2 deletions python/packages/mem0/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"


[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
4 changes: 2 additions & 2 deletions python/packages/purview/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"


[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
3 changes: 1 addition & 2 deletions python/packages/redis/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ omit = [
]

[tool.pyright]
extend = "../../pyproject.toml"
exclude = ['tests']
extends = "../../pyproject.toml"

[tool.mypy]
plugins = ['pydantic.mypy']
Expand Down
11 changes: 5 additions & 6 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ omit = [
]

[tool.pyright]
include = ["agent_framework", "samples"]
exclude = ["**/tests/**", "docs", "**/.venv/**", "samples/semantic-kernel-migration/**", "samples/autogen-migration/**", "packages/devui/frontend/**"]
include = ["agent_framework*"]
exclude = ["**/tests/**", "docs", "**/.venv/**", "packages/devui/frontend/**"]
typeCheckingMode = "strict"
reportUnnecessaryIsInstance = false
reportMissingTypeStubs = false
Expand Down Expand Up @@ -206,7 +206,6 @@ executor.type = "uv"

[tool.poe.tasks]
markdown-code-lint = """uv run python check_md_code_blocks.py README.md ./packages/**/README.md ./samples/**/*.md --exclude cookiecutter-agent-framework-lab --exclude tau2 --exclude packages/devui/frontend"""
samples-code-check = """pyright ./samples"""
docs-install = "uv sync --all-packages --all-extras --dev -U --prerelease=if-necessary-or-explicit --group=docs"
docs-clean = "rm -rf docs/build"
docs-build = "uv run python ./docs/generate_docs.py"
Expand All @@ -230,8 +229,8 @@ build-meta = "python -m flit build"
build = ["build-packages", "build-meta"]
publish = "uv publish"
# combined checks
check = ["fmt", "lint", "pyright", "mypy", "test", "markdown-code-lint", "samples-code-check"]
pre-commit-check = ["fmt", "lint", "pyright", "markdown-code-lint", "samples-code-check"]
check = ["fmt", "lint", "pyright", "mypy", "test", "markdown-code-lint"]
pre-commit-check = ["fmt", "lint", "pyright", "markdown-code-lint"]

[tool.poe.tasks.all-tests-cov]
cmd = """
Expand Down Expand Up @@ -330,4 +329,4 @@ name = "agent_framework_meta"

[build-system]
requires = ["flit-core >= 3.11,<4.0"]
build-backend = "flit_core.buildapi"
build-backend = "flit_core.buildapi"
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
- aiofiles installed for async file I/O.
- Write access to a tmp directory next to this script.
- A source text at resources/long_text.txt.
- Optional for SVG export: install the viz extra for agent framework workflow.
- Optional for SVG export: install graphviz.
Installation:
pip install agent-framework aiofiles graphviz
"""

# Define the temporary directory for storing intermediate results
Expand Down
Loading