uv
uv copied to clipboard
installing a workspace with workspace dependency groups
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)
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)
using --all-packages and --group dev seems to do the right thing (tm) ;-)