uv icon indicating copy to clipboard operation
uv copied to clipboard

installing a workspace with workspace dependency groups

Open kapilt opened this issue 6 months ago • 1 comments

Question

I'm trying to use a workspace to install a set of packages for the purpose of running ci/unittests, but It doesn't seem like we can install dependency groups like dev for the workspace dependencies, when doing so, because that only applies to the workspace, not to its transitive dependencies that are in the workspace.

is there a way to specify that we want optional dependency groups when a dependency via a workspace installing?

Platform

No response

Version

uv 0.7.3 (Homebrew 2025-05-07)

kapilt avatar May 17 '25 15:05 kapilt

if its helpful here is the workspace definition I'm using basically its a virtual workspace https://github.com/cloud-custodian/cloud-custodian/pull/10140/files#diff-953ec993435fd232c21d7c3ee0204c12a1a877c64dde528a1d07f30163aa5674

layout
   /top_level_package (c7n, part of workspace)
      /workspace ( virtual workspace with dependencies on all workspace packages)
      /tools
        /c7n_gcp (add-on package for c7n, part of workspace)

all the packages define dev dependency groups that need to be installed for ci to run, trying to understand how to make this work with uv. it seems uv sync is optionated to automatically remove packages in the virtualenv that are not related to the current package's sync operation, so we need someway to encapsulate installing all packages and their dev group dependencies to be able to run ci from a top level command (makefile target ~ make test)

kapilt avatar May 17 '25 15:05 kapilt

using --all-packages and --group dev seems to do the right thing (tm) ;-)

kapilt avatar May 18 '25 13:05 kapilt