Python: consolidate lab packages into a single one; update contribution guidelines (#940)

* consolidate lab packages into a single one; update contribution guidelines

* update dep list

* add poe tasks; fix tests and lint erros

* add lab tests for CI

* fix test

* update root pyproject.toml
This commit is contained in:
Eric Zhu
2025-09-27 03:28:05 +00:00
committed by GitHub
parent 9fec0f5ef4
commit 514d0209a8
55 changed files with 615 additions and 1087 deletions
-21
View File
@@ -1,21 +0,0 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+6 -2
View File
@@ -1,11 +1,15 @@
# Agent Framework Lab - Agent Framework x Agent Lightning
# Agent Framework Lab - Lightning
RL Module for Microsoft Agent Framework
> **Note**: This module is part of the consolidated `agent-framework-lab` package. Install the package with the `lightning` extra to use this module.
## Installation
Install the agent-framework-lab package with Lightning dependencies:
```bash
pip install agent-framework-lab-lightning
pip install "agent-framework-lab[lightning]"
```
## Usage
@@ -1,4 +0,0 @@
# Copyright (c) Microsoft. All rights reserved.
# This makes agent_framework a namespace package
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -1,4 +0,0 @@
# Copyright (c) Microsoft. All rights reserved.
# This makes agent_framework.lab a namespace package
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
@@ -1,4 +0,0 @@
# Copyright (c) Microsoft. All rights reserved.
# Import and re-export from the actual implementation
from agent_framework_lab_lightning import * # noqa: F403, F401
@@ -1,8 +1,6 @@
# Copyright (c) Microsoft. All rights reserved.
"""
RL Module for Microsoft Agent Framework
"""
"""RL Module for Microsoft Agent Framework."""
import importlib.metadata
@@ -11,11 +9,4 @@ try:
except importlib.metadata.PackageNotFoundError:
__version__ = "0.0.0" # Fallback for development mode
# Import your main exports here
# from .main_module import MainClass, main_function
__all__ = [
# List your exports here
# "MainClass",
# "main_function",
]
__all__: list[str] = []
@@ -1,87 +0,0 @@
[project]
name = "agent-framework-lab-lightning"
description = "RL Module for Microsoft Agent Framework"
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
readme = "README.md"
requires-python = ">=3.10"
version = "0.1.0b1"
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"
urls.release_notes = "https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true"
urls.issues = "https://github.com/microsoft/agent-framework/issues"
classifiers = [
"License :: OSI Approved :: MIT License",
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"agent-framework",
"pydantic>=2.0.0",
# Add your specific dependencies here
]
[project.scripts]
lightning = "agent_framework_lab_lightning:main"
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
packages = ["agent_framework_lab_lightning", "agent_framework.lab.lightning"]
[tool.setuptools.package-data]
agent_framework_lab_lightning = ["py.typed"]
[tool.ruff]
line-length = 120
target-version = "py310"
extend-exclude = ["tests", "__pycache__"]
[tool.ruff.lint]
select = ["E", "F", "I", "W", "UP", "C4", "N"]
ignore = ["N803", "N806", "N999", "UP007"]
[tool.ruff.format]
quote-style = "double"
[tool.mypy]
python_version = "3.10"
strict = true
check_untyped_defs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
show_error_codes = true
implicit_reexport = true
packages = ["agent_framework_lab_lightning"]
[tool.poe]
executor.type = "uv"
include = "../../../shared_tasks.toml"
[tool.poe.tasks]
test = "pytest --cov=agent_framework_lab_lightning --cov-report=term-missing:skip-covered tests"
mypy = "mypy agent_framework_lab_lightning"
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
addopts = "--strict-markers --strict-config"
markers = [
"unit: marks tests as unit tests",
"integration: marks tests as integration tests",
]
@@ -1 +0,0 @@
# Copyright (c) Microsoft. All rights reserved.
@@ -2,14 +2,16 @@
"""Tests for lightning module."""
import pytest
from agent_framework_lab_lightning import __version__
class TestLightning:
"""Test the lightning module."""
def test_version(self):
"""Test package version is defined."""
assert __version__ is not None
assert __version__ == "0.1.0b1"
# In development mode, version falls back to "0.0.0"
# In installed mode, it would be the actual package version
assert isinstance(__version__, str)
assert len(__version__) > 0