Skip to content

Feature: Complete TODO items in pet-uv for workspace support #290

Closed

Description

Summary

The pet-uv crate has incomplete TODO items related to workspace handling that should be addressed for complete uv environment support.

TODO Items

1. crates/pet-uv/src/lib.rs line 142

// TODO: maybe check for workspace in parent folders?

Context: When identifying uv environments, the code doesn't currently look for workspaces in parent directories. This could miss environments that are part of a parent workspace.

2. crates/pet-uv/src/lib.rs line 162

// TODO: check for workspace members/excludes

Context: uv workspaces can have members and excludes patterns. Currently these are not being checked, which could lead to incorrect environment association.

uv Workspace Configuration Reference

From uv documentation, pyproject.toml can contain:

[tool.uv.workspace]
members = ["packages/*"]
exclude = ["packages/excluded"]

Recommended Implementation

  1. When identifying a uv environment, walk up parent directories looking for pyproject.toml with [tool.uv.workspace]
  2. Parse workspace members and exclude globs
  3. Check if current project matches member patterns and doesn't match exclude patterns
  4. Associate environment with the workspace root if applicable

Priority

Medium - Improves accuracy of uv environment detection in monorepo/workspace setups.

Activity

  1. 149segolte commented on Feb 14, 2026

    @149segolte

    Quick question for clarification: is uv’s PEP 723 script support (https://docs.astral.sh/uv/guides/scripts/#creating-a-python-script) as documented here: inline script metadata, considered part of this issue, or is that being handled separately?

    Specifically, since PEP 723 allows inline script metadata irrespective of a pyproject.toml, does the script become part of the exclude glob or are they not expected to show up in the resolution at all.

  2. added a commit that references this issue on Feb 24, 2026
    1c5cbf0
  3. added a commit that references this issue on Mar 27, 2026
    80b4574
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debtCode quality issues

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions