-
Notifications
You must be signed in to change notification settings - Fork 478
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
Allow (un)installing integrations with system-wide uv installations #3342
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
subprocess.check_call(command) | ||
|
||
|
||
def is_installed_in_python_environment(package: str) -> bool: |
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.
I see that the is_installed_in_python_enviroment("uv")
and is_uv_installed()
calls behave differently. As far as I can see, one checks whether it is installed in the current environment as a Python package, and the other one checks if it is installed (even as a separate executable). While we use the first function in the utility functions above, we still use the second one in the in the cli/integration.py
. Does this mean we should change the other calls as well?
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.
This is by design: is_uv_installed
checks whether uv
is installed. It doesn't matter whether its globally or in the active python environment.
If uv
is not installed, but the user specified to install integrations using uv
, we fail.
Later on in the code when actually installing integrations with uv
(we've already verified that it's installed somewhere), we need to check whether it's installed globally or in the virtualenv. Depending on the outcome of that check, we run
python -m uv pip install
ifuv
is installed in the virtualenv. Running this command with a globally installeduv
would fail, because that is not accessible as a python module.uv pip install ...
ifuv
is not installed in the virtualenv but globally.
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.
Oh I see, I missed that connection. Got it 👍
Describe changes
Previously we checked whether
uv
is installed in the active python environment which failed ifuv
was installed globally using different package managers or manually installing it.Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes