Skip to content

Conversation

@eavanvalkenburg
Copy link
Member

Motivation and Context

Fixes a bug in the prek setup, and adds skills explicitly instead of through instructions.

Description

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

When a core package file changed, run_tasks_in_changed_packages.py ran
fmt, lint, and pyright in ALL 22 packages (66 tasks). Only type-checking
tasks (pyright, mypy) need to propagate to all packages since type
changes in core affect downstream packages. File-local tasks (fmt, lint)
only need to run in packages with actual file changes.

This reduces a core-only change from 66 tasks to 24 tasks (2 local +
22 pyright).

Also adds no-commit-to-branch builtin hook to protect the main branch
from direct commits.
Add 5 skills to python/.github/skills/ following the Agent Skills format:
- python-development: coding standards, type annotations, docstrings, logging
- python-testing: test structure, fixtures, running tests, async mode
- python-code-quality: linting, formatting, type checking, prek hooks, CI
- python-package-management: monorepo structure, lazy loading, versioning
- python-samples: sample structure, PEP 723, documentation guidelines
Copilot AI review requested due to automatic review settings February 10, 2026 08:33
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation python labels Feb 10, 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 updates the Python developer experience by fixing how prek determines which package tasks to run (avoiding unnecessary cross-package runs) and by moving detailed contributor guidance into explicit Copilot “skills” documents.

Changes:

  • Update run_tasks_in_changed_packages.py so core changes trigger type-checking across all packages, while fmt/lint remain scoped to changed packages.
  • Add Python Copilot skill documents under python/.github/skills/ and update python/AGENTS.md to reference them.
  • Add a pre-commit hook to prevent committing directly to main, and simplify Python Copilot instructions to point at the skill docs.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
python/scripts/run_tasks_in_changed_packages.py Splits “local” vs “type-check” tasks so core changes only fan out type-checking to all packages.
python/AGENTS.md Points contributors to skill docs and adds quick references/structure notes.
python/.pre-commit-config.yaml Adds branch protection hook (no-commit-to-branch) for main.
python/.github/skills/python-development/SKILL.md New skill: Python coding standards and conventions.
python/.github/skills/python-testing/SKILL.md New skill: testing practices and commands.
python/.github/skills/python-code-quality/SKILL.md New skill: lint/format/typecheck/prek/CI guidance.
python/.github/skills/python-package-management/SKILL.md New skill: monorepo package management and lazy-loading pattern.
python/.github/skills/python-samples/SKILL.md New skill: sample structure and PEP 723 guidance.
python/.github/instructions/python.instructions.md Updated Copilot instructions to defer to AGENTS.md + skills.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Feb 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Feb 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Feb 10, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 10, 2026
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL16601205787% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
3928 225 💤 0 ❌ 0 🔥 1m 10s ⏱️

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Feb 10, 2026
Merged via the queue into microsoft:main with commit 8ad6663 Feb 10, 2026
26 checks passed
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 python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants