diff --git a/sdk/ai/azure-ai-agents/pyproject.toml b/sdk/ai/azure-ai-agents/pyproject.toml index abdc05b7047f..4b96b67ec320 100644 --- a/sdk/ai/azure-ai-agents/pyproject.toml +++ b/sdk/ai/azure-ai-agents/pyproject.toml @@ -1,24 +1,62 @@ -[tool.mypy] -python_version = "3.10" -exclude = [ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +[build-system] +requires = ["setuptools>=77.0.3", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-ai-agents" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, ] -warn_unused_configs = true -ignore_missing_imports = true -follow_imports_for_stubs = false - -[tool.isort] -profile = "black" -line_length = 120 -known_first_party = ["azure"] -filter_files=true -extend_skip_glob = [ - "*/_vendor/*", - "*/_generated/*", - "*/_restclient/*", - "*/doc/*", - "*/.tox/*", +description = "Microsoft Corporation Azure Ai Agents Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 4 - Beta", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] +requires-python = ">=3.9" +keywords = ["azure", "azure sdk"] -[tool.azure-sdk-build] -whl_no_aio= false +dependencies = [ + "isodate>=0.6.1", + "azure-core>=1.35.0", + "typing-extensions>=4.6.0", +] +dynamic = [ +"version", "readme" +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" +[tool.setuptools.dynamic] +version = {attr = "azure.ai.agents._version.VERSION"} +readme = {file = ["README.md", "CHANGELOG.md"], content-type = "text/markdown"} + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "samples*", + "doc*", + "azure", + "azure.ai", +] + +[tool.setuptools.package-data] +pytyped = ["py.typed"] + +[tool.azure-sdk-build] +whl_no_aio = false diff --git a/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py b/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py index b9a2c645bd30..48e4ab5c7332 100644 --- a/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py +++ b/sdk/ai/azure-ai-agents/samples/agents_response_formats/sample_agents_json_schema_response_format.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. diff --git a/sdk/ai/azure-ai-agents/setup.py b/sdk/ai/azure-ai-agents/setup.py deleted file mode 100644 index 372a1c431d12..000000000000 --- a/sdk/ai/azure-ai-agents/setup.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - - -import os -import re -from setuptools import setup, find_packages - - -PACKAGE_NAME = "azure-ai-agents" -PACKAGE_PPRINT_NAME = "Azure AI Agents" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") - -# Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, "_version.py"), "r") as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Corporation {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=open("README.md", "r").read(), - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk", - keywords="azure, azure sdk", - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "samples", - "samples.utils", - "samples.agents_tools", - "samples.agents_async", - "samples.agents_multiagent", - "samples.agents_streaming", - "samples.agents_telemetry", - "samples.agents_tools", - "samples.assets", - "samples.agents_async.utils", - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.ai", - ] - ), - include_package_data=True, - package_data={ - "azure.ai.agents": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "azure-core>=1.30.0", - "typing-extensions>=4.6.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py b/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py index 23eadb933dd0..ef5f179b8576 100644 --- a/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py +++ b/sdk/ai/azure-ai-agents/tests/test_ai_instrumentor_base.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License.