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
17 changes: 15 additions & 2 deletions .azdo/ci-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ strategy:
Python_3.11:
PYTHON_VERSION: '3.11'

variables:
- name: PackageVersion
value: ''

steps:
- task: UsePythonVersion@0
inputs:
Expand All @@ -22,7 +26,7 @@ steps:

- script: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest black pytest-asyncio build
python -m pip install flake8 pytest black pytest-asyncio build setuptools-git-versioning
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
displayName: 'Install dependencies'

Expand All @@ -34,14 +38,23 @@ steps:
flake8 . --count --exit-zero --show-source --statistics
displayName: 'Lint with flake8'

- script: |
PACKAGE_VERSION=$(pwsh -File replace-version.ps1)
echo "##vso[task.setvariable variable=PackageVersion]$PACKAGE_VERSION"
echo "Package version set to: $PACKAGE_VERSION"
displayName: 'Set package version'
condition: eq(variables['PackageVersion'], '')

- script: |
mkdir -p dist
for dir in libraries/*; do
if [ -f "$dir/pyproject.toml" ]; then
(cd "$dir" && python -m build --outdir ../../dist)
fi
done
displayName: 'Build packages'
env:
PackageVersion: $(PackageVersion)
displayName: 'Set Version and Build packages'

- script: |
python -m pip install ./dist/microsoft_agents_activity*.whl
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest black pytest-asyncio build
python -m pip install flake8 pytest black pytest-asyncio build setuptools-git-versioning
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Check format with black
run: |
Expand All @@ -40,6 +40,12 @@ jobs:
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --show-source --statistics
- name: Set package version
run: |
cd ./versioning
version=$(setuptools-git-versioning)
echo "PackageVersion=$version" >> $GITHUB_ENV
echo "Package version set to: $version"
- name: Build packages
run: |
mkdir -p dist
Expand Down
6 changes: 3 additions & 3 deletions libraries/microsoft-agents-activity/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-activity"
version = "0.0.0a1"
description = "Activity schema library for Microsoft Agents"
dynamic = ["version"]
description = "A protocol library for Microsoft Agents"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
classifiers = [
Expand Down
8 changes: 8 additions & 0 deletions libraries/microsoft-agents-activity/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
)
10 changes: 2 additions & 8 deletions libraries/microsoft-agents-authentication-msal/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-authentication-msal"
version = "0.0.0a1"
dynamic = ["version", "dependencies"]
description = "A msal-based authentication library for Microsoft Agents"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
Expand All @@ -13,12 +13,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"microsoft-agents-hosting-core",
"msal>=1.31.1",
"requests>=2.32.3",
"cryptography>=44.0.0",
]

[project.urls]
"Homepage" = "https://github.com/microsoft/Agents"
14 changes: 14 additions & 0 deletions libraries/microsoft-agents-authentication-msal/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
install_requires=[
f"microsoft-agents-hosting-core=={package_version}",
"msal>=1.31.1",
"requests>=2.32.3",
"cryptography>=44.0.0",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-copilotstudio-client"
version = "0.0.0a1"
dynamic = ["version", "dependencies"]
description = "A client library for Microsoft Agents"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
Expand All @@ -13,9 +13,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"microsoft-agents-hosting-core",
]

[project.urls]
"Homepage" = "https://github.com/microsoft/Agents"
11 changes: 11 additions & 0 deletions libraries/microsoft-agents-copilotstudio-client/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
install_requires=[
f"microsoft-agents-hosting-core=={package_version}",
],
)
6 changes: 1 addition & 5 deletions libraries/microsoft-agents-hosting-aiohttp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-hosting-aiohttp"
version = "0.0.0a1"
dynamic = ["version", "dependencies"]
description = "Integration library for Microsoft Agents with aiohttp"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
Expand All @@ -13,10 +13,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"microsoft-agents-hosting-core",
"aiohttp>=3.11.11",
]

[project.urls]
"Homepage" = "https://github.com/microsoft/Agents"
12 changes: 12 additions & 0 deletions libraries/microsoft-agents-hosting-aiohttp/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
install_requires=[
f"microsoft-agents-hosting-core=={package_version}",
"aiohttp>=3.11.11",
],
)
9 changes: 1 addition & 8 deletions libraries/microsoft-agents-hosting-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-hosting-core"
version = "0.0.0a1"
dynamic = ["version", "dependencies"]
description = "Core library for Microsoft Agents"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
Expand All @@ -13,13 +13,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"pyjwt>=2.10.1",
"isodate>=0.6.1",
"azure-core>=1.30.0",
"microsoft-agents-activity",
"python-dotenv>=1.1.1",
]

[project.urls]
"Homepage" = "https://github.com/microsoft/Agents"
15 changes: 15 additions & 0 deletions libraries/microsoft-agents-hosting-core/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
install_requires=[
f"microsoft-agents-activity=={package_version}",
"pyjwt>=2.10.1",
"isodate>=0.6.1",
"azure-core>=1.30.0",
"python-dotenv>=1.1.1",
],
)
6 changes: 1 addition & 5 deletions libraries/microsoft-agents-hosting-teams/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-hosting-teams"
version = "0.0.0a1"
dynamic = ["version", "dependencies"]
description = "Integration library for Microsoft Agents with Teams"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
Expand All @@ -13,10 +13,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"microsoft-agents-hosting-core",
"aiohttp>=3.11.11",
]

[project.urls]
"Homepage" = "https://github.com/microsoft/Agents"
12 changes: 12 additions & 0 deletions libraries/microsoft-agents-hosting-teams/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
install_requires=[
f"microsoft-agents-hosting-core=={package_version}",
"aiohttp>=3.11.11",
],
)
7 changes: 1 addition & 6 deletions libraries/microsoft-agents-storage-blob/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-storage-blob"
version = "0.0.0a1"
dynamic = ["version", "dependencies"]
description = "A blob storage library for Microsoft Agents"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
Expand All @@ -13,11 +13,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"microsoft-agents-hosting-core",
"azure-core",
"azure-storage-blob",
]

[project.urls]
"Homepage" = "https://github.com/microsoft/Agents"
13 changes: 13 additions & 0 deletions libraries/microsoft-agents-storage-blob/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
install_requires=[
f"microsoft-agents-hosting-core=={package_version}",
"azure-core",
"azure-storage-blob",
],
)
7 changes: 1 addition & 6 deletions libraries/microsoft-agents-storage-cosmos/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "microsoft-agents-storage-cosmos"
version = "0.0.0a1"
dynamic = ["version", "dependencies"]
description = "A Cosmos DB storage library for Microsoft Agents"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"
Expand All @@ -13,11 +13,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"microsoft-agents-hosting-core",
"azure-core",
"azure-cosmos",
]

[project.urls]
"Homepage" = "https://github.com/microsoft/Agents"
13 changes: 13 additions & 0 deletions libraries/microsoft-agents-storage-cosmos/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from os import environ
from setuptools import setup

package_version = environ.get("PackageVersion", "0.0.0")

setup(
version=package_version,
install_requires=[
f"microsoft-agents-hosting-core=={package_version}",
"azure-core",
"azure-cosmos",
],
)
3 changes: 3 additions & 0 deletions replace-version.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd ./versioning
$ActualVersion = & { setuptools-git-versioning }
Write-Output $ActualVersion
1 change: 1 addition & 0 deletions versioning/TARGET-VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.
3 changes: 3 additions & 0 deletions versioning/helper/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .versioning import get_version

__all__ = ["get_version"]
2 changes: 2 additions & 0 deletions versioning/helper/versioning.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def get_version():
return "0.0.0a1"
17 changes: 17 additions & 0 deletions versioning/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[build-system]
requires = ["setuptools>=41", "wheel", "setuptools-git-versioning>=2.0,<3", ]
build-backend = "setuptools.build_meta"

[tool.setuptools-git-versioning]
enabled = true
version_file = "TARGET-VERSION"
count_commits_from_version_file = true
dev_template = "{tag}{ccount}"
dirty_template = "{tag}{ccount}"

[project]
name = "helper"
dynamic = ["version"]
description = "Helper project to calculate version"
authors = [{name = "Microsoft Corporation"}]
requires-python = ">=3.9"