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
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ jobs:
- name: Build package
run: |
AGENT365_PYTHON_SDK_PACKAGE_VERSION=${{ needs.version-number.outputs.PACKAGE_VERSION }} uv build --all-packages --wheel
env:
AGENT365_PYTHON_SDK_PACKAGE_VERSION: ${{ needs.version-number.outputs.PACKAGE_VERSION }}

- name: Run unit tests
run: |
Expand Down
31 changes: 7 additions & 24 deletions libraries/microsoft-agents-a365-notifications/setup.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
31 changes: 7 additions & 24 deletions libraries/microsoft-agents-a365-observability-core/setup.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
# Copyright (c) Microsoft. All rights reserved.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""
Version utilities for Agent365 SDK packages.
This module is deprecated. Versioning is now handled automatically by
setuptools-git-versioning. See versioning/TARGET-VERSION and
HOW_TO_SET_A_VERSION.md for details.
"""

from __future__ import annotations

import os
from datetime import datetime
from zoneinfo import ZoneInfo


def build_version():
"""
Build version string for Agent365 SDK packages.
DEPRECATED: This function is no longer used.
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
Version is now automatically calculated by setuptools-git-versioning
based on Git history and tags. See HOW_TO_SET_A_VERSION.md for details.
Returns:
str: Version string in format YYYY.M.D+preview.HHMMSS or environment override
str: Version from AGENT365_PYTHON_SDK_PACKAGE_VERSION environment variable or "0.0.0"
"""
if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))
import warnings

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
warnings.warn(
"build_version() is deprecated. Version is now managed by setuptools-git-versioning.",
DeprecationWarning,
stacklevel=2,
)
return os.environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")
31 changes: 7 additions & 24 deletions libraries/microsoft-agents-a365-runtime/setup.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

import os
from datetime import datetime
from zoneinfo import ZoneInfo
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

from os import environ
from setuptools import setup


def build_version():
"""
Example: 2025.10.3+preview.65532 (PEP 440 compliant; avoids hyphens)
Uses UTC.
"""

if defined_version := os.getenv("A365_SDK_VERSION"):
return defined_version # For CI/CD to set a specific version.

today = datetime.now(ZoneInfo("UTC"))

return (
f"{today.year}.{today.month}.{today.day}+preview.{today.hour}{today.minute}{today.second}"
)


VERSION = build_version()
# Get version from environment variable set by CI/CD
# This will be set by setuptools-git-versioning in the CI pipeline
package_version = environ.get("AGENT365_PYTHON_SDK_PACKAGE_VERSION", "0.0.0")

setup(
version=VERSION,
version=package_version,
)
Loading
Loading