Skip to content

Add PEP 735 dependency group support to UvBuilder#9

Open
yzx9 wants to merge 1 commit into
apposed:mainfrom
yzx9:uv-builder-groups
Open

Add PEP 735 dependency group support to UvBuilder#9
yzx9 wants to merge 1 commit into
apposed:mainfrom
yzx9:uv-builder-groups

Conversation

@yzx9
Copy link
Copy Markdown

@yzx9 yzx9 commented Jun 2, 2026

  • Add group(String...) method to UvBuilder that maps to uv sync --group, enabling PEP 735 dependency groups selection
  • Groups are tracked in appose.json only when non-empty, preserving backward compatibility with existing environments
  • Validate that group() is only used with pyproject.toml scheme

closes apposed/appose#32

Example

Environment env = Appose.uv()
    .content(pyprojectContent)
    .scheme("pyproject.toml")
    .group("appose")
    .group("cowsay")  # support multiple groups
    .build();

Test plan

  • testUvPyprojectWithGroup: builds env with --group cowsay and verifies cowsay is available
  • testUvGroupRejectsWithoutPyproject: confirms IllegalArgumentException when using group() without pyproject.toml
  • testUvStateNoGroupField: verifies appose.json has no groups field when none specified (backward compat)
  • testUvStateGroupFieldPresent: verifies appose.json contains groups when specified

All 7 UvBuilderTest tests pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: UV Builder support for dependency groups like Pixi's .environment()

1 participant