mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Simplify Python Poe tasks and unify package selectors (#4722)
* updated automation tasks and commands, with alias for the time being * Restore aggregate test exclusions Preserve the legacy all-tests scope for test --all by excluding lab and devui from the default aggregate sweep, while still allowing explicit package selection. Also ignore hidden/generated test directories such as .mypy_cache during aggregate discovery. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * updated versions in pre-commit --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
d3d0100822
commit
f48c4512d3
@@ -1,5 +1,5 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
# ruff: noqa: INP001, S404, S603
|
||||
# ruff: noqa: S404, S603
|
||||
|
||||
"""Raise dependency upper bounds, validate, and persist the latest passing set."""
|
||||
|
||||
@@ -22,15 +22,16 @@ from urllib import error as urllib_error
|
||||
from urllib import request as urllib_request
|
||||
|
||||
import tomli
|
||||
from packaging.requirements import InvalidRequirement, Requirement
|
||||
from packaging.version import InvalidVersion, Version
|
||||
from rich import print
|
||||
|
||||
from scripts.dependencies._dependency_bounds_runtime import (
|
||||
extend_command_with_runtime_tools,
|
||||
extend_command_with_task,
|
||||
next_zero_major_minor_boundary,
|
||||
)
|
||||
from packaging.requirements import InvalidRequirement, Requirement
|
||||
from packaging.version import InvalidVersion, Version
|
||||
from rich import print
|
||||
from scripts.task_runner import discover_projects, extract_poe_tasks
|
||||
from scripts.task_runner import discover_projects, extract_poe_tasks, project_filter_matches
|
||||
|
||||
CHECK_TASK_PRIORITY = ("check", "typing", "pyright", "mypy", "lint")
|
||||
REQ_PATTERN = r"^\s*([A-Za-z0-9_.-]+(?:\[[^\]]+\])?)\s*(.*?)\s*$"
|
||||
@@ -1088,7 +1089,7 @@ def main() -> None:
|
||||
"--packages",
|
||||
nargs="*",
|
||||
default=None,
|
||||
help="Optional package filters by workspace path (e.g., packages/core) or package name.",
|
||||
help="Optional package filters by short name (for example core), workspace path, or package name.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--dependencies",
|
||||
@@ -1153,7 +1154,11 @@ def main() -> None:
|
||||
project_section = package_config.get("project", {})
|
||||
optional_dependencies = project_section.get("optional-dependencies", {}) or {}
|
||||
dependency_groups = package_config.get("dependency-groups", {}) or {}
|
||||
if package_filters and str(project_path) not in package_filters and package_name not in package_filters:
|
||||
# Reuse the shared selector matcher so direct optimizer runs accept the
|
||||
# same short-name package filters as the contributor-facing Poe tasks.
|
||||
if package_filters and not any(
|
||||
project_filter_matches(project_path, package_filter, [package_name]) for package_filter in package_filters
|
||||
):
|
||||
continue
|
||||
plans.append(
|
||||
PackagePlan(
|
||||
|
||||
Reference in New Issue
Block a user