Skip to content

.WithUvEnvironment in the Python extensions doesn't expose a way to add additional arguments #12294

@tonybaloney

Description

@tonybaloney

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I have a Python project which has both required dependencies and optional dependencies.

[project]
name = "my-demo"
version = "0.1.0"
description = "Agent implementations for the shop application"
requires-python = ">=3.12"
dependencies = [
"fastapi[standard]"
]

[project.optional-dependencies]
test = [
"pytest",
]

.WithUvEnvironment doesn't provide any parameters or overrides to add additional command line flags. Any .WithArgs methods would override the Python start command, not the uv sync command.

Describe the solution you'd like

I would like the ability to include certain command line flags on the uv sync command generated by .WithUvEnvironment.

For example:

  • uv sync --extra test to include the test dependencies
  • uv sync --all-extras to include all extras
  • uv sync --group <group> to include a specific group
  • uv sync --no-group <group> to exclude a specific group
  • uv sync --index to use a different PyPi index (like the PyTorch one)

Please add the ability to add extra runtime flags for uv sync.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagespython

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions