Skip to content

Python: chore(python): improve dependency range automation#4343

Open
eavanvalkenburg wants to merge 8 commits intomicrosoft:mainfrom
eavanvalkenburg:dependency_strategy
Open

Python: chore(python): improve dependency range automation#4343
eavanvalkenburg wants to merge 8 commits intomicrosoft:mainfrom
eavanvalkenburg:dependency_strategy

Conversation

@eavanvalkenburg
Copy link
Member

@eavanvalkenburg eavanvalkenburg commented Feb 27, 2026

Summary

  • tighten dependency bounds and coding standards guidance
  • add dependency range validation workflow with issue/PR automation
  • update related tests and dependency pins for compatibility

Closes #902

Copilot AI review requested due to automatic review settings February 27, 2026 10:53
@eavanvalkenburg eavanvalkenburg requested a review from a team as a code owner February 27, 2026 10:53
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation python lab Agent Framework Lab labels Feb 27, 2026
@github-actions github-actions bot changed the title chore(python): improve dependency range automation Python: chore(python): improve dependency range automation Feb 27, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves Python dependency management automation by introducing a comprehensive dependency range validation system, tightening dependency bounds across packages, and enhancing test organization.

Changes:

  • Adds automated dependency range validation script and GitHub Actions workflow to continuously validate and update dependency upper bounds
  • Tightens dependency version constraints across all packages to follow documented standards for stable (>=1.0.0), prerelease, and pre-1.0 dependencies
  • Improves test organization by adding @pytest.mark.integration markers and moving Azure-specific embedding tests to a dedicated file
  • Updates coding standards documentation with clearer dependency versioning guidelines and corrects code examples

Reviewed changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
python/scripts/validate_dependency_ranges.py New script that validates dependency ranges by testing candidate versions and updating pyproject.toml files
.github/workflows/python-dependency-range-validation.yml New workflow that runs validation, creates issues for failures, and opens PRs with updated bounds
python/pyproject.toml Adds validate-dependency-ranges poe task
python/packages/*/pyproject.toml Tightens dependency bounds and adds integration test markers to test commands
python/packages/core/tests/openai/test_openai_embedding_client.py Removes Azure tests (moved to dedicated file) and adds integration markers
python/packages/core/tests/azure/test_azure_embedding_client.py New file with Azure OpenAI embedding tests and proper test isolation
python/packages/azure-ai-search/tests/test_aisearch_context_provider.py Adds fixture to clear ambient Azure Search environment variables for test isolation
python/CODING_STANDARD.md Clarifies external dependency versioning guidelines and fixes code example
python/packages/core/agent_framework/_types.py Reorders docstring sections (Returns before Raises) following Python conventions
python/packages/core/agent_framework/_workflows/_workflow.py Style improvement: combines variable assignment and yield statements
python/packages/devui/agent_framework_devui/_deployment.py Style improvement: combines variable assignment and yield statements
python/packages/azurefunctions/agent_framework_azurefunctions/_app.py Reorders docstring sections (Returns before Raises)
.gitignore Adds dependency-range-results.json to ignored files

eavanvalkenburg and others added 2 commits February 27, 2026 12:32
- tighten dependency bounds and coding standards guidance\n- add dependency range validation workflow, reporting, and issue automation\n- update related tests and dependency pins for compatibility

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Feb 27, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/core/agent_framework
   _agents.py3424387%435, 439, 491, 856, 892, 908, 991–994, 1055–1057, 1178, 1194, 1196, 1209, 1215, 1251, 1253, 1262–1267, 1272, 1274, 1280–1281, 1288, 1290–1291, 1299–1300, 1303–1305, 1313–1314, 1316, 1321, 1323
packages/core/agent_framework/_workflows
   _workflow.py2671992%88, 269–271, 273–274, 292, 296, 430, 618, 639, 695, 707, 713, 718, 738–740, 753
TOTAL22222275887% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
4714 247 💤 0 ❌ 0 🔥 1m 20s ⏱️

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two scripts have very little comments. Perhaps a README to document how they work.

@@ -0,0 +1,208 @@
name: Python - Dependency Range Validation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add short comment to describe the purpose of this workflow.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lab Agent Framework Lab python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: ensure dependency bounds are as loose as possible

5 participants