Hi! Currently rules_pycross with lock_import allows to import development groups (e.g. with the development_groups argument). Would it be possible to make it so that targets coming from an imported dev dependency group are testonly in Bazel?
For instance, let's pretend we have a uv lockfile generated from a pyproject.toml that looks like this
[project]
...
dependencies = ["prod_dep_1", "prod_dep_2"]
[dependency-groups]
dev = ["dev_dep"]
And then we import it with lock_import
lock_import.import_uv(
lock_file = "//:uv.lock",
project_file = "//:pyproject.toml",
repo = "my_deps",
development_groups = ["dev"],
...
)
This will generate Bazel targets like
@my_deps://prod_dep_1
@my_deps://prod_dep_2
@my_deps://dev_dep
Would be interesting if @my_deps://dev_dep was testonly so that it cannot be accidentally added as a dependency of a non-test target.
Hi! Currently
rules_pycrosswithlock_importallows to import development groups (e.g. with thedevelopment_groupsargument). Would it be possible to make it so that targets coming from an imported dev dependency group aretestonlyin Bazel?For instance, let's pretend we have a uv lockfile generated from a
pyproject.tomlthat looks like thisAnd then we import it with lock_import
This will generate Bazel targets like
Would be interesting if
@my_deps://dev_depwastestonlyso that it cannot be accidentally added as a dependency of a non-test target.