Python: Add coverage threshold gate for PR checks (#3392) (#3510)

* Python: Add coverage threshold gate for PR checks (#3392)

- Add python-check-coverage.py script to enforce coverage threshold on specific modules
- Modify python-test-coverage.yml to run coverage check after tests
- Initial enforced module: agent_framework_azure_ai at 85% threshold
- Other modules are reported for visibility but don't block merges

* Fail if module not found

* Force unit test job to run

* Comment 1

* Fix coverage check to use full package paths for submodule support

* Update report format
This commit is contained in:
Tao Chen
2026-01-29 15:58:52 -08:00
committed by GitHub
Unverified
parent 96f30bdf57
commit 0a0de4ac21
4 changed files with 273 additions and 2 deletions
@@ -1245,7 +1245,7 @@ def test_magentic_agent_factory_with_standard_manager_options():
custom_final_prompt = "Custom final: {task}"
# Create a custom task ledger
from agent_framework._workflows._magentic import _MagenticTaskLedger
from agent_framework._workflows._magentic import _MagenticTaskLedger # type: ignore
custom_task_ledger = _MagenticTaskLedger(
facts=ChatMessage(role=Role.ASSISTANT, text="Custom facts"),