-
Notifications
You must be signed in to change notification settings - Fork 8
Fix Set versioning #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
31
libraries/microsoft-agents-a365-observability-core/setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
31
libraries/microsoft-agents-a365-observability-extensions-langchain/setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
31
libraries/microsoft-agents-a365-observability-extensions-openai/setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
31
libraries/microsoft-agents-a365-observability-extensions-semantickernel/setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | ||
| ) |
33 changes: 20 additions & 13 deletions
33
libraries/microsoft-agents-a365-runtime/microsoft_agents_a365/runtime/version_utils.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
31
libraries/microsoft-agents-a365-tooling-extensions-agentframework/setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
31
libraries/microsoft-agents-a365-tooling-extensions-azureaifoundry/setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
31
libraries/microsoft-agents-a365-tooling-extensions-openai/setup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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, | ||
| ) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.