Use dependency groups for Python SDK tooling (#27538)

## Summary

`just fmt` previously used `uv run --with ruff` to make Ruff available.
Because `--with` creates an ephemeral overlay outside the project
lockfile, uv periodically re-resolved Ruff (by default every 10 minutes)
instead of using the version recorded in `uv.lock`.

Move the Python SDK tooling dependencies from the published `dev` extra
into `format`, `test`, and composed `dev` dependency groups. The
formatter now selects only the locked `format` group, contributor and CI
setup explicitly sync the `dev` group, and CI and release commands reuse
that environment with `--frozen --no-sync`. The scripts formatter also
uses its project's locked Ruff dependency instead of an ephemeral
overlay.

Validated the Python 3.12 SDK suite (119 passed, 38 skipped) and the
repository formatter.
This commit is contained in:
Charlie Marsh
2026-06-12 12:10:07 -04:00
committed by GitHub
Unverified
parent 3cac2e0d3f
commit c375deaf66
8 changed files with 46 additions and 29 deletions
@@ -145,9 +145,8 @@ def test_root_format_driver_covers_all_formatter_groups() -> None:
"--frozen",
"--project",
"sdk/python",
"--no-sync",
"--with",
"ruff",
"--only-group",
"format",
)
scripts_uv_run_args = (
"uv",
@@ -155,9 +154,6 @@ def test_root_format_driver_covers_all_formatter_groups() -> None:
"--frozen",
"--project",
"scripts",
"--no-sync",
"--with",
"ruff",
)
assert all(
command.args[: len(sdk_uv_run_args)] == sdk_uv_run_args