-
-
Notifications
You must be signed in to change notification settings - Fork 652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] use uv
for resolving Pants plugins
#21991
base: main
Are you sure you want to change the base?
Conversation
5818295
to
9549a9e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting approach. Fair to say that uv
itself is a side quest here? IIUC the real goal is to not need a scheduler, which means not using any existing pex-running rules. So at that point we must use some CLI tool directly, and uv
is an interesting choice? But we could also use pip
or even pex
, I would guess? We just can't use existing pex
machinery.
Correct, some tool needs to be invoked, it need not be So |
Getting some experience with |
|
||
yield working_set, root_dir, repo_dir | ||
|
||
|
||
def test_no_plugins(rule_runner: RuleRunner) -> None: | ||
with plugin_resolution(rule_runner) as (working_set, _, _): | ||
@pytest.mark.parametrize("use_uv", (False, True)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can parametrize a fixture instead:
@pytest.fixture(params=[False, True], ids=["pip", "uv"])
def use_uv(request) -> bool:
return request.param
def test_1(use_uv: bool): ...
def test_2(use_uv: bool): ...
see the docs here https://docs.pytest.org/en/6.2.x/fixture.html#parametrizing-fixtures
Use
uv
for resolving Pants plugins. Enabled via new--experimental-use-uv-for-plugin-resolution
option.