Skip to content

Commit 80b4574

Browse files
authored
feat: validate uv workspace members/excludes and discover parent workspaces (Fixes #290) (#352)
Addresses the TODO items in `pet-uv` for workspace member/exclude validation. ## Changes - Parse `[tool.uv.workspace]` `members` and `exclude` fields instead of using `IgnoredAny` - Add `is_workspace_member()` with glob pattern matching (using `require_literal_separator` so `*` doesn't cross directory boundaries) - Walk up parent directories via `find_workspace_for_project()` to discover workspace roots - Stop at the first workspace found — if the project isn't a member of it, it's not part of any workspace - Add `glob` dependency to `pet-uv` - 9 new tests covering member matching, exclusion, implicit members, parent discovery, and deserialization Fixes #290 cc @zsol — would appreciate your input since you authored the original `pet-uv` workspace support in #263.
1 parent b8bff92 commit 80b4574

File tree

3 files changed

+345
-44
lines changed

3 files changed

+345
-44
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/pet-uv/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pet-python-utils = { path = "../pet-python-utils" }
1010
serde = {version = "1.0.226", features = ["derive"]}
1111
toml = "0.9.7"
1212
log = "0.4.21"
13+
glob = "0.3.1"
1314

1415
[dev-dependencies]
1516
tempfile = "3.13"

0 commit comments

Comments
 (0)