Python: [BREAKING] Main to core (#983)

* removed pydantic from types

* fix assistants client

* Remove Pydantic usage from workflow code.

* updated lock and test fixes

* moved main to core, and setup meta package

* updated versions

* updated lock

* fixed agents dependency

* added retry to merge tests

---------

Co-authored-by: Evan Mattson <evan.mattson@microsoft.com>
This commit is contained in:
Eduard van Valkenburg
2025-09-30 09:18:36 +02:00
committed by GitHub
Unverified
parent fc4fce7973
commit 35d2d9fe7f
137 changed files with 308 additions and 543 deletions
+2 -2
View File
@@ -77,7 +77,7 @@ jobs:
UV_CACHE_DIR: /tmp/.uv-cache
- name: Test with pytest
timeout-minutes: 10
run: uv run poe all-tests -n logical --dist loadfile --dist worksteal
run: uv run poe all-tests -n logical --dist loadfile --dist worksteal --timeout 300 --retries 3 --retry-delay 10
working-directory: ./python
- name: Test main samples
timeout-minutes: 10
@@ -137,7 +137,7 @@ jobs:
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Test with pytest
timeout-minutes: 10
run: uv run poe all-tests -n logical --dist loadfile --dist worksteal
run: uv run poe all-tests -n logical --dist loadfile --dist worksteal --timeout 300 --retries 3 --retry-delay 10
working-directory: ./python
- name: Test azure samples
timeout-minutes: 10
+1 -1
View File
@@ -159,7 +159,7 @@ Alternatively, you can run them using VSCode Tasks. Open the command palette
If you want to run the tests for a single package, you can use the `uv run poe test` command with the package name as an argument. For example, to run the tests for the `agent_framework` package, you can use:
```bash
uv run poe --directory packages/main test
uv run poe --directory packages/core test
```
These commands also output the coverage report.
+2 -2
View File
@@ -4,7 +4,7 @@ description = "A2A integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0b1"
version = "1.0.0-b251001"
license-files = ["LICENSE"]
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
@@ -85,5 +85,5 @@ mypy = "mypy --config-file $POE_ROOT/pyproject.toml agent_framework_a2a"
test = "pytest --cov=agent_framework_a2a --cov-report=term-missing:skip-covered tests"
[build-system]
requires = ["flit-core >= 3.9,<4.0"]
requires = ["flit-core >= 3.11,<4.0"]
build-backend = "flit_core.buildapi"
@@ -54,7 +54,6 @@ from azure.ai.agents.models import (
CodeInterpreterToolDefinition,
FileSearchTool,
FunctionName,
FunctionToolOutput,
ListSortOrder,
McpTool,
MessageDeltaChunk,
@@ -873,9 +872,9 @@ class AzureAIAgentClient(BaseChatClient):
else:
results.append(json.dumps(item))
if len(results) == 1:
tool_outputs.append(FunctionToolOutput(tool_call_id=call_id, output=results[0]))
tool_outputs.append(ToolOutput(tool_call_id=call_id, output=results[0]))
else:
tool_outputs.append(FunctionToolOutput(tool_call_id=call_id, output=json.dumps(results)))
tool_outputs.append(ToolOutput(tool_call_id=call_id, output=json.dumps(results)))
elif isinstance(content, FunctionApprovalResponseContent):
if tool_approvals is None:
tool_approvals = []
+4 -4
View File
@@ -4,7 +4,7 @@ description = "Azure AI Foundry integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0b1"
version = "1.0.0-b251001"
license-files = ["LICENSE"]
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
@@ -23,9 +23,9 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"agent-framework",
"agent-framework-core",
"azure-ai-projects >= 1.0.0b11",
"azure-ai-agents >= 1.2.0b4",
"azure-ai-agents == 1.2.0b5",
"aiohttp ~= 3.8",
]
@@ -85,5 +85,5 @@ mypy = "mypy --config-file $POE_ROOT/pyproject.toml agent_framework_azure_ai"
test = "pytest --cov=agent_framework_azure_ai --cov-report=term-missing:skip-covered tests"
[build-system]
requires = ["flit-core >= 3.9,<4.0"]
requires = ["flit-core >= 3.11,<4.0"]
build-backend = "flit_core.buildapi"
+4 -8
View File
@@ -4,7 +4,7 @@ description = "Copilot Studio integration for Microsoft Agent Framework."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0b1"
version = "1.0.0-b251001"
license-files = ["LICENSE"]
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
@@ -23,7 +23,7 @@ classifiers = [
"Typing :: Typed",
]
dependencies = [
"agent-framework",
"agent-framework-core",
"microsoft-agents-copilotstudio-client>=0.3.1",
]
@@ -84,10 +84,6 @@ include = "../../shared_tasks.toml"
mypy = "mypy --config-file $POE_ROOT/pyproject.toml agent_framework_copilotstudio"
test = "pytest --cov=agent_framework_copilotstudio --cov-report=term-missing:skip-covered tests"
[tool.uv.build-backend]
module-name = "agent_framework_copilotstudio"
module-root = ""
[build-system]
requires = ["uv_build>=0.8.2,<0.9.0"]
build-backend = "uv_build"
requires = ["flit-core >= 3.11,<4.0"]
build-backend = "flit_core.buildapi"
@@ -1,10 +1,10 @@
[project]
name = "agent-framework"
description = "Microsoft Agent Framework for building AI Agents with Python."
name = "agent-framework-core"
description = "Microsoft Agent Framework for building AI Agents with Python. This is the core package that has all the core abstractions and implementations."
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0b1" # TODO: decide on initial version and versioning strategy
version = "1.0.0-b251001"
license-files = ["LICENSE"]
urls.homepage = "https://learn.microsoft.com/en-us/semantic-kernel/overview/"
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
@@ -39,46 +39,9 @@ dependencies = [
]
[project.optional-dependencies]
azure-ai = [
"agent-framework-azure-ai"
]
azure = [
"agent-framework-azure-ai"
]
microsoft-copilotstudio = [
"agent-framework-copilotstudio"
]
microsoft = [
"agent-framework-copilotstudio"
]
redis = [
"agent-framework-redis"
]
viz = [
"graphviz>=0.20.0"
]
runtime = [
"agent-framework-runtime"
]
mem0 = [
"agent-framework-mem0"
]
a2a = [
"agent-framework-a2a"
]
devui = [
"agent-framework-devui"
]
all = [
"agent_framework_copilotstudio",
"agent-framework-azure-ai",
"agent-framework-runtime",
"agent-framework-mem0",
"agent-framework-a2a",
"agent-framework-redis",
"agent-framework-devui",
"graphviz>=0.20.0"
]
[tool.uv]
prerelease = "if-necessary-or-explicit"
@@ -94,7 +57,7 @@ fallback-version = "0.0.0"
[tool.pytest.ini_options]
testpaths = [
'tests',
'packages/main/tests',
'packages/core/tests',
'packages/a2a/tests',
'packages/azure-ai/tests',
'packages/copilotstudio/tests',
@@ -144,6 +107,9 @@ include = "../../shared_tasks.toml"
mypy = "mypy --config-file $POE_ROOT/pyproject.toml agent_framework"
test = "pytest --cov=agent_framework --cov-report=term-missing:skip-covered tests"
[tool.flit.module]
name = "agent_framework"
[build-system]
requires = ["flit-core >= 3.9,<4.0"]
requires = ["flit-core >= 3.11,<4.0"]
build-backend = "flit_core.buildapi"

Some files were not shown because too many files have changed in this diff Show More